human
Complete this python program:
def _climate_chart(content_type):
assistant
#Here is the Python code you requested.

    """
    """
    kwargs = dict(request.vars)
    specs = json.loads(kwargs.pop('spec'))
    def list_of(converter):
        def convert_list(choices):
            return map(converter, choices)
        return convert_list
    checked_specs = []
    for (label, spec) in specs.iteritems():
        arguments = {}
        errors = []
        for (name, converter) in dict(query_expression=str, place_ids=list_of(int)).iteritems():
            try:
                value = spec.pop(name)
            except KeyError:
                errors.append(('%s    missing' % name))
            else:
                try:
                    arguments[name] = converter(value)
                except TypeError:
                    errors.append(('%s    is    wrong    type' % name))
                except AssertionError as assertion_error:
                    errors.append(('%s:    %s' % (name, assertion_error)))
        if spec:
            errors.append(('Unexpected    arguments:    %s' % spec.keys()))
        checked_specs.append((label, arguments))
    if errors:
        raise HTTP(400, '<br    />'.join(errors))
    else:
        response.headers['Content-Type'] = content_type
        data_image_file_path = _map_plugin().render_plots(specs=checked_specs, width=int(kwargs.pop('width')), height=int(kwargs.pop('height')))
        return data_image_file_path