@staticmethod
def _normalize_mapping(mapping):
    """
    Normalizes the schema mapping.
    """
    key2type = {}
    key2name = {}
    for key, ent in mapping.items():
        if isinstance(ent, (tuple, list)):
            key_type, key_name = ent
        else:
            key_type, key_name = ent, key
        key2type[key] = key_type
        key2name[key] = key_name
    return key2type, key2name
