code: def __init__(self, data):
      self.device_infos = None
      self.span_idx = None
      self.data = None
      self.extra_info = None
      self.schema_version = None
      self.has_hostnodes = True
      self.has_devicenodes = True
      self.has_memnodes = True
      self.start_in_timeline_ns = None
      if isinstance(data, dict):
          self.parse_json(data)
          self.content = data
      else:
          self.parse_protobuf(data)
          with tempfile.NamedTemporaryFile("r") as fp:
              data.save(fp.name, "json")
              fp.seek(0)
              self.content = json.loads(fp.read())
  
imports: import collections
  import functools
  import json
  import re
  import sys
  import tempfile
  from .utils import traverse_tree
label_desc: Use image node_id 1 to create a new ProfilerResult object  with example: obj = ProfilerResult(data)