def _scalars_match(scalar_name1: str, scalar_name2: str) -> bool:
    """Return whether the two input scalars are considered to be the same.

    For now, two input scalars are considered to be the same if they're the same scalar, if
    one is ID and the other is String, or if one is ID and the other is Int. This may be
    extended in the future.

    Args:
        scalar_name1: name of a scalar, may be built-in or user defined.
        scalar_name2: name of a scalar, may be built-in or user defined.

    Returns:
        True if the two scalars are considered the same, False otherwise.
    """
    if scalar_name1 == scalar_name2:
        return True
    scalar_names = frozenset((scalar_name1, scalar_name2))
    if scalar_names == frozenset(("String", "ID")) or scalar_names == frozenset(("Int", "ID")):
        return True
    return False