code: def summarize_profiler_info(
      prof: torch.autograd.profiler.profile,
  ) -> str:
      """
      Summarizes the statistics in the specified profiler.
      """
  
      # create sorted list of times per operator:
      op2time = {}
      for item in prof.key_averages():
          op2time[item.key] = (
              item.cpu_time_total / 1000.0,
              item.cuda_time_total / 1000.0,
          )  # to milliseconds
      op2time = sorted(
          op2time.items(), key=operator.itemgetter(1), reverse=True
      )
  
      # created string containing information:
      str = "\n%s\tCPU Time\tCUDA Time\n" % ("Key".rjust(20))
      for key, value in op2time:
          str += "%s\t%2.5f ms\t%2.5f ms\n" % (
              key.rjust(20),
              value[0],
              value[1],
          )
      return str
  
imports: import collections.abc
  import logging
  import operator
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from classy_vision.generic.util import eval_model, get_batchsize_per_replica, get_model_dummy_input, is_leaf, is_on_gpu
  from torch.cuda import cudart
label_desc: Use image node_id 5 for calling a global function with example usage: summarize_profiler_info(prof) and returns: str