def hash_key(key: int, size: int) -> int:
    """
    Return an integer for the given key to be used as an index to a table of
    the given size.

    >>> hash_key(10, 7)
    3
    """
    return key % size