code: def signature(f):
      r"""Get the function f 's input arguments. A useful gadget
      when some function slot might be instantiated into multiple functions.
  
      Args:
          f (:obj:`function`) : the function to get the input arguments.
  
      Returns:
          namedtuple : of args, default, varargs, keywords, respectively.s
  
      """
      sig = inspect.signature(f)
      args = [
          p.name
          for p in sig.parameters.values()
          if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD
      ]
      varargs = [
          p.name
          for p in sig.parameters.values()
          if p.kind == inspect.Parameter.VAR_POSITIONAL
      ]
      varargs = varargs[0] if varargs else None
      keywords = [
          p.name
          for p in sig.parameters.values()
          if p.kind == inspect.Parameter.VAR_KEYWORD
      ]
      keywords = keywords[0] if keywords else None
      defaults = [
          p.default
          for p in sig.parameters.values()
          if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD
          and p.default is not p.empty
      ] or None
      argspec = namedtuple(
          "Signature", ["args", "defaults", "varargs", "keywords"]
      )
      return argspec(args, defaults, varargs, keywords)
  
file_path: OpenPrompt/openprompt/utils/utils.py
imports: from math import ceil
  import os
  import shutil
  from typing import List
  import inspect
  from collections import namedtuple
  import torch
  from yacs.config import CfgNode
  from openprompt.utils.logging import logger
label_desc: Use image node_id 2 for calling a global function with example usage: signature(f) and returns: argspec