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 get_kernel_tc_pie(self, topk, time_unit="ms"):
      if not self.kernel_parser:
          return
      data = OrderedDict()
      data["column_name"] = ["name", "calls", "ratio"]
  
      data["events"] = []
  
      sorted_items = sorted(
          self.kernel_items.items(),
          key=lambda x: x[1].gpu_time,
          reverse=True,
      )
  
      if topk <= 0:
          items = sorted_items
      else:
          items = sorted_items[:topk]
  
      total_calls = 0.0
      tensorcore_calls = 0.0
      for kernel_name, item in items:
          if item.tensorcore_used:
              tensorcore_calls += item.call
          total_calls += item.call
  
      data["events"].append(
          {
              "name": "Tensor core used",
              "calls": tensorcore_calls,
              "ratio": format_ratio(tensorcore_calls / total_calls),
          }
      )
      data["events"].append(
          {
              "name": "Tensor core unused",
              "calls": total_calls - tensorcore_calls,
              "ratio": format_ratio(
                  (total_calls - tensorcore_calls) / total_calls
              ),
          }
      )
      return data
  
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 14 for calling the ProfilerData obj's underlying member method code with example usage: obj.get_kernel_tc_pie(topk, time_unit) and returns: data