parameters: (obj, expected_types)
docstring: Check if an object is of the expected type.
  
    Args:
      obj: The object being checked.
      expected_types: (`type` or an iterable of `type`s) The expected `type`(s)
        of obj.
  
    Raises:
        TypeError: If obj is not an instance of expected_type.
docstring_summary: Check if an object is of the expected type.
docstring_tokens: Check if an object is of the expected type .
function: def _check_type(obj, expected_types):
    """Check if an object is of the expected type.
  
    Args:
      obj: The object being checked.
      expected_types: (`type` or an iterable of `type`s) The expected `type`(s)
        of obj.
  
    Raises:
        TypeError: If obj is not an instance of expected_type.
    """
    if not isinstance(obj, expected_types):
      raise TypeError("Expected type %s; got type %s" %
                      (expected_types, type(obj)))
function_tokens: def _check_type ( obj , expected_types ) : if not isinstance ( obj , expected_types ) : raise TypeError ( "Expected type %s; got type %s" % ( expected_types , type ( obj ) ) )