class_docstr: Layer by layer profiling of PyTorch models, using the PyTorch profiler
  for memory profiling. Parts of the code are adapted from :obj:`torchprof`
  for layer-wise grouping.
  
  Args:
      model (torch.nn.Module): The underlying model to be profiled.
      enabled (bool, optional): If set to :obj:`True`, turn on the profiler.
          (default: :obj:`False`)
      use_cuda (bool, optional): Whether to profile CUDA execution.
          (default: :obj:`False`)
      profile_memory (bool, optional): If set to :obj:`True`, also profile
          memory usage. (default: :obj:`False`)
      paths ([str], optional): Pre-defined paths for fast loading.
          (default: :obj:`None`)
code: def __repr__(self) -> str:
      return self.get_trace()[0]
  
imports: import functools
  from collections import OrderedDict, defaultdict, namedtuple
  from typing import Any, List, NamedTuple, Optional, Tuple
  import torch
  import torch.profiler
label_desc: Use image node_id 5 for calling the Profiler obj's underlying member method code with example usage: obj.__repr__() and returns: self