code: def get_function_signature(function, method=True):
      wrapped = getattr(function, "_original_function", None)
      if wrapped is None:
          signature = inspect.getargspec(function)
      else:
          signature = inspect.getargspec(wrapped)
      defaults = signature.defaults
      if method:
          args = signature.args[1:]
      else:
          args = signature.args
      if defaults:
          kwargs = zip(args[-len(defaults) :], defaults)
          args = args[: -len(defaults)]
      else:
          kwargs = []
      st = "%s.%s(" % (
          clean_module_name(function.__module__),
          function.__name__,
      )
  
      for a in args:
          st += str(a) + ", "
      for a, v in kwargs:
          if isinstance(v, str):
              v = "'" + v + "'"
          st += str(a) + "=" + str(v) + ", "
      if kwargs or args:
          signature = st[:-2] + ")"
      else:
          signature = st + ")"
      return signature
  
imports: import re
  import inspect
  import os
  import shutil
  from elephas import spark_model, ml_model
  from elephas.parameter import client, server
  from elephas.utils import functional_utils, rdd_utils, serialization
  from elephas.ml import adapter
  from elephas.mllib import adapter
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: get_function_signature(function, method) and returns: signature