def _is_dictionary_with_integer_keys(candidate):
    """Infer whether the argument is a dictionary with integer keys."""
    return isinstance(candidate, dict) and all(
        isinstance(key, int) for key in candidate
    )