code: def GetName(obj):
    
    precondition.AssertType(obj, (type, types.FunctionType))
  
    if PY2:
      return obj.__name__.decode("ascii")
    else:
      return obj.__name__
docs: A compatibility wrapper for getting object's name.
  
    In Python 2 class names are returned as `bytes` (since class names can contain
    only ASCII characters) whereas in Python 3 they are `unicode` (since class
    names can contain arbitrary unicode characters).
  
    This function makes this behaviour consistent and always returns class name as
    an unicode string.
  
    Once support for Python 2 is dropped all invocations of this call can be
    replaced with ordinary `__name__` access.
  
    Args:
      obj: A type or function object to get the name for.
  
    Returns:
      Name of the specified class as unicode string.