def get_any_of(getter,  possible_keys,  default=None):
    """Search for the value of any of `possible_keys` in `dictionary`,  returning `default` if none are found.

    >>> get_any_of( {"A":1},  ["C","D","A"], "UNDEFINED")
    1
    >>> get_any_of( {"X":1},  ["C","D","A"], "UNDEFINED")
    'UNDEFINED'
    """
    for key in possible_keys:
        val = getter.get(key.upper(), None)
        if val is None:
            val = getter.get(key.lower(), None)
        if val is not None and val not in ["undefined", "UNDEFINED"]:
            return val
    else:
        return default