class_docstr: TaskHooks can handle some tasks during the spectific event.
class_docstr_tok: ["TaskHooks","can","handle","some","tasks","during","the","spectific","event","."]
docstr: check if the the handler function of spectific event is existing.
  Args:
      hook_type (str): the spectific event name
      name (str): the handler function name
  Returns:
      bool: True or False
docstr_tok: ["check","if","the","the","handler","function","of","spectific","event","is","existing",".","Args",":","hook_type","(","str",")",":","the","spectific","event","name","name","(","str",")",":","the","handler","function","name","Returns",":","bool",":","True","or","False"]
code: def exist(self, hook_type: str, name: str) -> bool:
      """
      check if the the handler function of spectific event is existing.
      Args:
          hook_type (str): the spectific event name
          name (str): the handler function name
      Returns:
          bool: True or False
      """
      if (
          hook_type not in self._registered_hooks
          or name not in self._registered_hooks[hook_type]
      ):
          return False
      else:
          return True
  
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 5 for calling the TaskHooks obj's underlying member method code with example usage: obj.exist(hook_type, name) and returns: False, True