code: def import_dir(path, verbose=True):
      # ensure that the passed directory exists / is readable
      if not exists(path):
          print(f"[X] Unable to read the directory '{path}'.")
          return
  
      # list the contents of the directory
      dirs = glob(abspath(join(path, "*")))
  
      # traverse full directory, importing all modules found there
      for d in dirs:
          dirname = basename(d)
  
          # only look in directories which are valid pandas_ta categories
          if dirname not in [*pandas_ta.Category]:
              if verbose:
                  print(
                      f"[i] Skipping the sub-directory '{dirname}' since it's not a valid pandas_ta category."
                  )
              continue
  
          # for each module found in that category (directory)...
          for module in glob(abspath(join(path, dirname, "*.py"))):
              module_name = splitext(basename(module))[0]
  
              # ensure that the supplied path is included in our python path
              if d not in sys.path:
                  sys.path.append(d)
  
              # (re)load the indicator module
              module_functions = load_indicator_module(module_name)
  
              # figure out which of the modules functions to bind to pandas_ta
              fcn_callable = module_functions.get(module_name, None)
              fcn_method_callable = module_functions.get(
                  f"{module_name}_method", None
              )
  
              if fcn_callable == None:
                  print(
                      f"[X] Unable to find a function named '{module_name}' in the module '{module_name}.py'."
                  )
                  continue
              if fcn_method_callable == None:
                  missing_method = f"{module_name}_method"
                  print(
                      f"[X] Unable to find a method function named '{missing_method}' in the module '{module_name}.py'."
                  )
                  continue
  
              # add it to the correct category if it's not there yet
              if module_name not in pandas_ta.Category[dirname]:
                  pandas_ta.Category[dirname].append(module_name)
  
              bind(module_name, fcn_callable, fcn_method_callable)
              if verbose:
                  print(
                      f"[i] Successfully imported the custom indicator '{module}' into category '{dirname}'."
                  )
  
file_path: pandas-ta/pandas_ta/custom.py
imports: import importlib
  import os
  import sys
  import types
  from os.path import abspath, join, exists, basename, splitext
  from glob import glob
  import pandas_ta
  from pandas_ta import AnalysisIndicators
label_desc: Use image node_id 4 for calling a global function with example usage: import_dir(path, verbose) without return types