code: def load_package(filename: str, function: Callable) -> Callable:
      """Load a function/class from a script "filename" """
      sys.path.insert(0, path.dirname(path.abspath(filename)))
      mod = path.basename(filename).rstrip(".py")
      mod = importlib.import_module(mod)
      return getattr(mod, function)
  
imports: import sys, importlib
  from os import path
  from typing import Callable
label_desc: Use image node_id 1 for calling a global function with example usage: load_package(filename, function) and returns: getattr