from typing import Tuple
from typing import Type
from typing import Any


def get_types_filter(desired_types: Tuple[Type[Any], ...]):
  """Returns a value filter that only keeps values with the given types."""
  return lambda arg_value: arg_value.type in desired_types