def METHOD_NAME(self, config):
    if not isinstance(config, dict):
        config = {'api_key': config}
    config.setdefault('append_quality', True)
    config.setdefault('origin', [])
    if not isinstance(config['origin'], list):
        config['origin'] = [config['origin']]
    return config