code: def moduleinfo(
      name: str,
      version: str,
      author: str = None,
      author_email: str = None,
      summary: str = None,
      type: str = None,
      meta=None,
  ) -> Callable:
      """
      Mark Module information for a python class, and the class will automatically be extended to inherit HubModule. In other words, python classes
      marked with moduleinfo can be loaded through hub.Module.
      """
  
      def _wrapper(cls: Generic) -> Generic:
          wrap_cls = cls
          _meta = RunModule if not meta else meta
          if not issubclass(cls, _meta):
              _bases = []
              for _b in cls.__bases__:
                  if issubclass(_meta, _b):
                      continue
                  _bases.append(_b)
              _bases.append(_meta)
              _bases = tuple(_bases)
              attr_dict = dict(cls.__dict__)
              attr_dict.pop("__dict__", None)
              wrap_cls = builtins.type(cls.__name__, _bases, attr_dict)
  
          wrap_cls.name = name
          wrap_cls.version = utils.Version(version)
          wrap_cls.author = author
          wrap_cls.author_email = author_email
          wrap_cls.summary = summary
          wrap_cls.type = type
          wrap_cls._hook_by_hub = True
          return wrap_cls
  
      return _wrapper
  
imports: import ast
  import builtins
  import codecs
  import inspect
  import os
  import re
  import sys
  from typing import Callable
  from typing import Generic
  from typing import List
  from typing import Optional
  from typing import Union
  import paddle
  import paddle2onnx
  from easydict import EasyDict
  from paddlehub.compat import paddle_utils
  from paddlehub.compat.module.module_v1 import ModuleV1
  from paddlehub.utils import log
  from paddlehub.utils import parser
  from paddlehub.utils import utils
label_desc: Use image node_id 3 for calling a global function with example usage: moduleinfo(name, version, author, author_email, summary, type, meta) and returns: _wrapper, wrap_cls