def factory(msgtype):
    for name, obj in inspect.getmembers(sys.modules[__name__]):
        if inspect.isclass(obj) and issubclass(obj, Message):
            try:
                if obj.__name__ == msgtype:
                    return obj
            except __HOLE__:
                pass

    # Fall back to basic OAuth2 messages
    return message.factory(msgtype)
dataset/ETHPy150Open rohe/pyoidc/src/oic/oic/message.py/factory