'Converts config to dict form and sets defaults if needed'

def prepare_config(self, config):

    config = config
    if isinstance(config, basestring):
        config = {u'id': [config]}
    elif isinstance(config, list):
        config = {u'id': config}
    if (isinstance(config, dict) and (not isinstance(config[u'id'], list))):
        config[u'id'] = [config[u'id']]
    config.setdefault(u'content_types', [self.content_types[0]])
    config.setdefault(u'job_types', [self.job_types[0]])
    config.setdefault(u'max_entries', 200)
    config.setdefault(u'match_type', u'strict')
    if isinstance(config.get(u'content_types'), str_types):
        log.debug(u'Converted    content    type    from    string    to    list.')
        config[u'content_types'] = [config[u'content_types']]
    if isinstance(config[u'job_types'], str_types):
        log.debug(u'Converted    job    type    from    string    to    list.')
        config[u'job_types'] = [config[u'job_types']]
    if ((u'actor' in config[u'job_types']) and (u'actress' not in config[u'job_types'])):
        config[u'job_types'].append(u'actress')
    return config
