code: def _SanitizedArgSpec(obj):
      """Get an ArgSpec string that is free of addresses.
  
      We have callables as function arg defaults. This results in addresses in
      getargspec output. This function returns a sanitized string list of base
      classes.
  
      Args:
        obj: A python routine for us the create the sanitized arspec of.
  
      Returns:
        string, a string representation of the argspec.
      """
      output_string = ""
      unsanitized_arg_spec = tf_inspect.getargspec(obj)
  
      for clean_attr in ("args", "varargs", "keywords"):
          output_string += "%s=%s, " % (
              clean_attr,
              getattr(unsanitized_arg_spec, clean_attr),
          )
  
      if unsanitized_arg_spec.defaults:
          sanitized_defaults = []
          for val in unsanitized_arg_spec.defaults:
              str_val = str(val)
              # Sanitize argspecs that have hex code in them.
              if " at 0x" in str_val:
                  sanitized_defaults.append(
                      "%s instance>" % str_val.split(" at ")[0]
                  )
              else:
                  sanitized_defaults.append(str_val)
  
          output_string += "defaults=%s, " % sanitized_defaults
  
      else:
          output_string += "defaults=None"
  
      return output_string
  
file_path: tensorflow-upstream/tensorflow/tools/api/lib/python_object_to_proto_visitor.py
imports: import enum
  import re
  import sys
  from google.protobuf import message
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import tf_decorator
  from tensorflow.python.util import tf_inspect
  from tensorflow.tools.api.lib import api_objects_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: _SanitizedArgSpec(obj) and returns: output_string