from typing import Any


def _equal_or_splat_equal(value: Any, sequence: Any) -> bool:
  """Returns True if value==sequence or value==(every element in sequence)."""
  if value == sequence:
    return True
  elif isinstance(sequence, (list, tuple)):
    for element in sequence:
      if not _equal_or_splat_equal(value, element):
        return False
    return True
  return False