def get_entry_by_id(keys, keyid):
    """ Returns the first child of keys with ID='keyid'. """
    for key in keys:
        if key.getAttribute("ID") == keyid:
            return key

    return False