def complex_type(name=None):
    '''Decorator for registering complex types'''
    def wrapped(cls):
        ParseType.type_mapping[name or cls.__name__] = cls
        return cls
    return wrapped
Decorator for registering complex types