def _IsIn(matcher, operand, value):
  """Applies matcher to determine if the expression operand is in value.

  Args:
    matcher: Boolean match function that takes value as an argument and
      returns True if the expression operand is in value.
    operand: Number or string operand.
    value: The value to match against.

  Returns:
    True if the expression operand is in value.
  """
  if matcher(operand, value):
    return True
  try:
    for index in value:
      if matcher(operand, index):
        return True
  except TypeError:
    pass
  return False