class_docstr: This class is used for creating reports from data generated by the
  Profile class.  It is a "friend" of that class, and imports data either
  by direct access to members of Profile class, or by reading in a dictionary
  that was emitted (via marshal) from the Profile class.
  
  The big change from the previous Profiler (in terms of raw functionality)
  is that an "add()" method has been provided to combine Stats from
  several distinct profile runs.  Both the constructor and the add()
  method now take arbitrarily many file names as arguments.
  
  All the print methods now take an argument that indicates how many lines
  to print.  If the arg is a floating point number between 0 and 1.0, then
  it is taken as a decimal percentage of the available lines to be printed
  (e.g., .1 means print 10% of all available lines).  If it is an integer,
  it is taken to mean the number of lines of data that you wish to have
  printed.
  
  The sort_stats() method now processes some additional options (i.e., in
  addition to the old -1, 0, 1, or 2 that are respectively interpreted as
  'stdname', 'calls', 'time', and 'cumulative').  It takes either an
  arbitrary number of quoted strings or SortKey enum to select the sort
  order.
  
  For example sort_stats('time', 'name') or sort_stats(SortKey.TIME,
  SortKey.NAME) sorts on the major key of 'internal function time', and on
  the minor key of 'the name of the function'.  Look at the two tables in
  sort_stats() and get_sort_arg_defs(self) for more examples.
  
  All methods return self, so you can string together commands like:
      Stats('foo', 'goo').strip_dirs().sort_stats('calls').                            print_stats(5).print_callers(5)
class_docstr_tok: ["This","class","is","used","for","creating","reports","from","data","generated","by","the","Profile","class",".","It","is","a","``","friend","''","of","that","class",",","and","imports","data","either","by","direct","access","to","members","of","Profile","class",",","or","by","reading","in","a","dictionary","that","was","emitted","(","via","marshal",")","from","the","Profile","class",".","The","big","change","from","the","previous","Profiler","(","in","terms","of","raw","functionality",")","is","that","an","``","add","(",")","''","method","has","been","provided","to","combine","Stats","from","several","distinct","profile","runs",".","Both","the","constructor","and","the","add","(",")","method","now","take","arbitrarily","many","file","names","as","arguments",".","All","the","print","methods","now","take","an","argument","that","indicates","how","many","lines","to","print",".","If","the","arg","is","a","floating","point","number","between","0","and","1.0",",","then","it","is","taken","as","a","decimal","percentage","of","the","available","lines","to","be","printed","(","e.g.",",",".1","means","print","10","%","of","all","available","lines",")",".","If","it","is","an","integer",",","it","is","taken","to","mean","the","number","of","lines","of","data","that","you","wish","to","have","printed",".","The","sort_stats","(",")","method","now","processes","some","additional","options","(","i.e.",",","in","addition","to","the","old","-1",",","0",",","1",",","or","2","that","are","respectively","interpreted","as","'stdname","'",",","'calls","'",",","'time","'",",","and","'cumulative","'",")",".","It","takes","either","an","arbitrary","number","of","quoted","strings","or","SortKey","enum","to","select","the","sort","order",".","For","example","sort_stats","(","'time","'",",","'name","'",")","or","sort_stats","(","SortKey.TIME",",","SortKey.NAME",")","sorts","on","the","major","key","of","'internal","function","time","'",",","and","on","the","minor","key","of","'the","name","of","the","function","'",".","Look","at","the","two","tables","in","sort_stats","(",")","and","get_sort_arg_defs","(","self",")","for","more","examples",".","All","methods","return","self",",","so","you","can","string","together","commands","like",":","Stats","(","'foo","'",",","'goo","'",")",".strip_dirs","(",")",".sort_stats","(","'calls","'",")",".","print_stats","(","5",")",".print_callers","(","5",")"]
code: def __init__(self, *args, stream=None):
      self.stream = stream or sys.stdout
      if not len(args):
          arg = None
      else:
          arg = args[0]
          args = args[1:]
      self.init(arg)
      self.add(*args)
  
imports: import sys
  import os
  import time
  import marshal
  import re
  from enum import StrEnum, _simple_enum
  from functools import cmp_to_key
  from dataclasses import dataclass
  from typing import Dict
label_desc: Use image node_id 1 to create a new Stats object  with example: obj = Stats()