code: def has_func(obj, fun):
      """check if a class has specified function: https://stackoverflow.com/a/5268474
  
      Args:
          obj: the class to check
          fun: specified function to check
      Returns:
          A bool to indicate if obj has funtion "fun"
      """
      check_fun = getattr(obj, fun, None)
      return callable(check_fun)
  
file_path: PARL/parl/utils/utils.py
imports: import os
  import subprocess
  import sys
  import multiprocessing
  import numpy
  from parl.utils import logger
label_desc: Use image node_id 1 for calling a global function with example usage: has_func(obj, fun) and returns: callable