class_docstr: Profiling information about a single function.
class_docstr_tok: ["Profiling","information","about","a","single","function","."]
code: def privateuse1_time_total(self):
      if self.is_async or not self.use_device:
          return 0
      if self.device_type == DeviceType.CPU:
          if not self.is_legacy:
              # account for the kernels in the children ops
              return sum(
                  kinfo.duration for kinfo in self.kernels
              ) + sum(
                  ch.privateuse1_time_total for ch in self.cpu_children
              )
          else:
              # each legacy cpu events has a single (fake) kernel
              return sum(kinfo.duration for kinfo in self.kernels)
      else:
          assert self.device_type == DeviceType.PrivateUse1
          return self.time_range.elapsed_us()
  
imports: import bisect
  import itertools
  import math
  from collections import defaultdict, namedtuple
  from operator import attrgetter
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from torch.autograd import DeviceType
label_desc: Use image node_id 13 for calling the FunctionEvent obj's underlying member method code with example usage: obj.privateuse1_time_total() and returns: int, self, unknown, sum