class_docstr: TaskHooks can handle some tasks during the spectific event.
class_docstr_tok: ["TaskHooks","can","handle","some","tasks","during","the","spectific","event","."]
docstr: get the hooks information, including the source code.
  Args:
      show_default (bool): show the information of Paddlehub default hooks or not, default False
  Returns:
      str: the formatted string of the hooks information
docstr_tok: ["get","the","hooks","information",",","including","the","source","code",".","Args",":","show_default","(","bool",")",":","show","the","information","of","Paddlehub","default","hooks","or","not",",","default","False","Returns",":","str",":","the","formatted","string","of","the","hooks","information"]
code: def info(self, show_default: bool = False) -> str:
      """
      get the hooks information, including the source code.
      Args:
          show_default (bool): show the information of Paddlehub default hooks or not, default False
      Returns:
          str: the formatted string of the hooks information
      """
      # formatted output the source code
      ret = ""
      for hook_type, hooks in self._registered_hooks.items():
          already_print_type = False
          for name, func in hooks.items():
              if name == "default" and not show_default:
                  continue
              if not already_print_type:
                  ret += "hook_type: %s{\n" % hook_type
                  already_print_type = True
              source = inspect.getsource(func)
              ret += " name: %s{\n" % name
              for line in source.split("\n"):
                  ret += "  %s\n" % line
              ret += " }\n"
          if already_print_type:
              ret += "}\n"
      if not ret:
          ret = "Not any customized hooks have been defined, you can set show_default=True to see the default hooks information"
      return ret
  
file_path: PaddleHub/paddlehub/compat/task/hook.py
imports: import inspect
  from collections import OrderedDict
  from typing import Callable
label_desc: Use image node_id 6 for calling the TaskHooks obj's underlying member method code with example usage: obj.info(show_default) and returns: ret