code: def _get_arg_list(name, fobj):
      """Given a function object, constructs a list of arguments
      and their defaults. Takes care of varargs and kwargs"""
  
      trunc = 20  # Sometimes argument length can be huge
  
      argspec = inspect.getfullargspec(fobj)
  
      arg_list = []
  
      if argspec.args:
          for arg in argspec.args:
              arg_list.append(str(arg))
  
      arg_list.reverse()
  
      # Now add the defaults
      if argspec.defaults:
          for i in range(len(argspec.defaults)):
              arg_list[i] = (
                  str(arg_list[i]) + "=" + str(argspec.defaults[-i])
              )
  
      # Get the list in right order
      arg_list.reverse()
  
      # Add var args
      if argspec.varargs:
          arg_list.append(argspec.varargs)
      if argspec.varkw:
          arg_list.append(argspec.varkw)
  
      # Truncate long arguments
      arg_list = [x[:trunc] for x in arg_list]
  
      # Construct the parameter string (enclosed in brackets)
      str_param = "%s(%s)" % (name, ", ".join(arg_list))
  
      return str_param
  
file_path: sympy/bin/coverage_doctest.py
imports: from __future__ import print_function
  import os
  import sys
  import inspect
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  from sympy.utilities.misc import filldedent
label_desc: Use image node_id 4 for calling a global function with example usage: _get_arg_list(name, fobj) and returns: str_param