def migrate_hosted_facts(facts):
    """ Apply migrations for master facts """
    if 'master' in facts:
        if facts['master'] in 'router_selector':
            if 'hosted' not in facts:
                facts['hosted'] = {}
            if 'router' not in facts['hosted']:
                facts['hosted']['router'] = {}
            facts['hosted']['router']['selector'] = facts['master'].pop('router_selector')
    return facts
dataset/ETHPy150Open openshift/openshift-ansible/roles/openshift_facts/library/openshift_facts.py/migrate_hosted_facts/swapped operands of `in`