docs: def get_stack_frames(error_stack: bool = True) -> list:
      """
      Returns a list of the current stack frames, which are pruned focus on the
      Cauldron code where the relevant information resides.
      """
  
      cauldron_path = environ.paths.package()
      resources_path = environ.paths.resources()
      frames = (
          list(traceback.extract_tb(sys.exc_info()[-1]))
          if error_stack else
          traceback.extract_stack()
      ).copy()
  
      def is_cauldron_code(test_filename: str) -> bool:
          if not test_filename or not test_filename.startswith(cauldron_path):
              return False
  
          if test_filename.startswith(resources_path):
              return False
  
          return True
  
      while len(frames) > 1 and is_cauldron_code(frames[0].filename):
          frames.pop(0)
  
      return frames