code: def get_stack_info(
      frames,
      with_locals=True,
      library_frame_context_lines=None,
      in_app_frame_context_lines=None,
      include_paths_re=None,
      exclude_paths_re=None,
      locals_processor_func=None,
  ):
      
      results = []
      for frame, lineno in frames:
          result = get_frame_info(
              frame,
              lineno,
              library_frame_context_lines=library_frame_context_lines,
              in_app_frame_context_lines=in_app_frame_context_lines,
              with_locals=with_locals,
              include_paths_re=include_paths_re,
              exclude_paths_re=exclude_paths_re,
              locals_processor_func=locals_processor_func,
          )
          if result:
              results.append(result)
      return results
docs: Given a list of frames, returns a list of stack information
      dictionary objects that are JSON-ready.
  
      We have to be careful here as certain implementations of the
      _Frame class do not contain the necessary data to lookup all
      of the information we want.
  
      :param frames: a list of (Frame, lineno) tuples
      :param with_locals: boolean to indicate if local variables should be collected
      :param include_paths_re: a regex to determine if a frame is not a library frame
      :param exclude_paths_re: a regex to exclude frames from not being library frames
      :param locals_processor_func: a function to call on all local variables
      :return: