code: def get_source_lines_and_file(obj, error_msg=None):
      """
      Wrapper around inspect.getsourcelines and inspect.getsourcefile.
  
      Returns: (sourcelines, file_lino, filename)
      """
      filename = None  # in case getsourcefile throws
      try:
          filename = inspect.getsourcefile(obj)
          sourcelines, file_lineno = inspect.getsourcelines(obj)
      except OSError as e:
          msg = f"Can't get source for {obj}."
          if error_msg:
              msg += "\n" + error_msg
          raise OSError(msg) from e
  
      return sourcelines, file_lineno, filename
  
imports: import builtins
  import collections
  import inspect
  import io
  import logging
  import pickle
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: get_source_lines_and_file(obj, error_msg) and returns: sourcelines,  file_lineno,  filename