def _popanykey(dct, *keys, strict=False):
    """
    Returns the first of the listed keys to be found in the dict
    :param dct: a dict
    :param keys:
    :param strict: [False] if True, raise KeyError if we get to the end of the list and nothing was found
    :return:
    """
    for key in keys:
        if key.lower() in dct:
            return dct.pop(key.lower())
    if strict:
        raise KeyError(keys)
    return None