class_docstr: Hold all parsed data to serve for user requests.
class_docstr_tok: ["Hold","all","parsed","data","to","serve","for","user","requests","."]
code: def __init__(self, run, worker_name, span_indx, profiler_result):
      self.run = run
      self.worker_name = worker_name
      self.span_indx = span_indx
      self.node_trees = profiler_result.get_data()
      filter_type(self.node_trees)
      self.extra_infos = profiler_result.get_extra_info()
      self.span_idx = profiler_result.get_span_idx()
      self.device_infos = profiler_result.get_device_infos()
      self.overview_parser = None
      self.operator_parser = None
      self.distributed_parser = None
      self.memory_parser = None
      self.kernel_parser = None
      self.trace_parser = None
      self.has_gpu = profiler_result.has_device()
  
      if profiler_result.has_host():
          # overview parser
          self.overview_parser = OverviewParser()
          self.overview_parser.parse(self.node_trees)
          self.merged_events_per_stage = (
              self.overview_parser.merged_events_per_stage
          )
          self.model_perspective_items = (
              self.overview_parser.model_perspective_items
          )
          self.userdefined_items = (
              self.overview_parser.userdefined_items
          )
          self.gpu_ulitization = self.overview_parser.gpu_ulitization
          self.process_id = self.overview_parser.process_id
          # operator parser
          self.operator_parser = OperatorParser()
          self.operator_parser.parse(self.node_trees)
          self.operator_items = self.operator_parser.items
          self.operator_items_with_input_shape = (
              self.operator_parser.items_with_input_shape
          )
  
          # distributed parser
          if profiler_result.has_device():
              self.distributed_parser = DistributedParser()
              self.distributed_parser.parse(self.node_trees)
              self.distributed_time = self.distributed_parser.steps_time
  
          if profiler_result.has_memory():
              # memory parser
              self.memory_parser = MemoryParser()
              self.memory_parser.parse(self.node_trees)
              self.memory_curve = self.memory_parser.memory_curve
              self.allocated_items = self.memory_parser.allocated_items
              self.reserved_items = self.memory_parser.reserved_items
              self.paired_events = self.memory_parser.paired_events
              self.size_ranges = self.memory_parser.size_ranges
              self.peak_allocation_values = (
                  self.memory_parser.peak_allocation_values
              )
  
      if profiler_result.has_device():
          # kernel parser
          self.kernel_parser = KernelParser()
          self.kernel_parser.parse(traverse_tree(self.node_trees))
          self.kernel_items = self.kernel_parser.kernel_items
          self.kernel_items_with_op_name_attributes = (
              self.kernel_parser.kernel_items_with_op_name_attributes
          )
          self.occupancy = self.kernel_parser.occupancy
          self.sm_efficiency = self.kernel_parser.sm_efficiency
          self.tensorcore_ratio = self.kernel_parser.tensor_core_ratio
          self.gpu_ids = self.kernel_parser.gpu_ids
  
      # trace parser
      self.trace_parser = TraceParser()
      self.trace_parser.parse(profiler_result.content)
  
imports: from collections import defaultdict
  from collections import OrderedDict
  from .parser.distributed_parser import DistributedParser
  from .parser.kernel_parser import KernelParser
  from .parser.memory_parser import MemoryParser
  from .parser.operator_parser import OperatorParser
  from .parser.overview_parser import CPUType
  from .parser.overview_parser import GPUType
  from .parser.overview_parser import OverviewParser
  from .parser.trace_parser import TraceParser
  from .parser.utils import format_float
  from .parser.utils import format_memory
  from .parser.utils import format_ratio
  from .parser.utils import format_time
  from .parser.utils import traverse_tree
label_desc: Use image node_id 1 to create a new ProfilerData object  with example: obj = ProfilerData(run, worker_name, span_indx, profiler_result)