def METHOD_NAME(name):
    nameparts = name.split(', ')
    country = nameparts[0]
    region = nameparts[len(nameparts) - 1]
    logging.debug(country)
    logging.debug(region)
    if len(region) == 0 or len(country) == 0:
        return None
    parent_ids = list(map(lambda c: c['actor_id'], get_countries_from_name(country)))
    logging.debug(parent_ids)
    candidates = list(filter(lambda c: c['is_part_of'] in parent_ids and c['type'] == 'adm1', get_by_name(region)))
    logging.debug(candidates)
    if len(candidates) > 0:
        return candidates[0]['actor_id']
    else:
        return None