code: def get_culprit(omit_top_frames=1):
      
      try:
          caller_stack = stack()[omit_top_frames:]
          while len(caller_stack) > 0:
              frame = caller_stack.pop(0)
              filename = frame[1]
              # skip callee frames if they are other decorators or this file(func)
              if '<decorator' in filename or __file__ in filename:
                  continue
              else:
                  break
          lineno = frame[2]
          # avoid cyclic references!
          del caller_stack, frame
      except OSError:  # eg. os.getcwd() fails in conda-test, since cwd gets deleted.
          filename = 'unknown'
          lineno = -1
      return filename, lineno
docs: get the filename and line number calling this.
  
      Parameters
      ----------
      omit_top_frames: int, default=1
          omit n frames from top of stack stack. Purpose is to get the real
          culprit and not intermediate functions on the stack.
      Returns
      -------
      (filename: str, fileno: int)
      filename and line number of the culprit.