@classmethod
def get_type_name(cls):
    """Returns the class name unless the __type_name__ attribute is defined.
        """
    retval = cls.__type_name__
    if retval is None:
        retval = cls.__name__
    return retval
