class_docstr: Extends nn.Module so that its parameter tensors have an extra field called .grad_sample.
class_docstr_tok: ["Extends","nn.Module","so","that","its","parameter","tensors","have","an","extra","field","called",".grad_sample","."]
code: def __getattr__(self, item):
      try:
          return super().__getattr__(item)
      except AttributeError as e:
          submodules = dict(self._module.named_modules())
          if item and item in submodules:
              return submodules[item]
          raise e
  
imports: import logging
  from abc import ABC, abstractmethod
  from typing import Optional
  import torch.nn
  from opacus.utils.module_utils import trainable_parameters
  from torch.utils.hooks import RemovableHandle
label_desc: Use image node_id 3 for calling the AbstractGradSampleModule obj's underlying member method code with example usage: obj.__getattr__(item) and returns: super, submodules