code: def __init__(self, fct):
      assert callable(fct), "{} is not callable.".format(fct)
  
      # make function accessible via self.fct, give self.name
      self.fct = fct
      self.name = fct.__name__
  
      # find all input arguments
      input_args = argspec(fct).args
  
      self.input_features = [
          x for x in input_args if x.endswith("_s") or x.endswith("_t")
      ]
      self.input_rs = [
          x
          for x in input_args
          if x not in self.input_features
          and not x == "sources"
          and not x == "targets"
      ]
  
      # find all output variables
      source_code_return = inspect.getsourcelines(fct)[0][-1].strip()
      source_code_output = source_code_return[len("return") :]
      output = [x.strip() for x in source_code_output.split(",")]
  
      self.output_rs = [
          x for x in output if x != "sources" and x != "targets"
      ]
  
      # for selectors (connectors: self.output == self.output_rs)
      self.output = [x for x in output]
  
file_path: deepgraph/deepgraph/connectors_and_selectors.py
imports: import inspect
  import warnings
  from collections import Counter
  import numpy
  from deepgraph._find_selected_indices import _find_selected_indices
  from deepgraph.utils import _flatten
label_desc: Use image node_id 1 to create a new CreatorFunction object  with example: obj = CreatorFunction(fct)