code: def _patched_computation_module(
      module: nn.Module,
      complexity_computer: ComplexityComputer,
      module_name: str,
  ):
      """
      Patch the module to compute a module's parameters, like FLOPs.
  
      Calls compute_fn and passes the results to the complexity computer.
      """
      ty = type(module)
      typestring = module.__repr__()
  
      class ComputeModule(ty):
          orig_type = ty
  
          def _original_forward(self, *args, **kwargs):
              return ty.forward(self, *args, **kwargs)
  
          def forward(self, *args, **kwargs):
              out = self._original_forward(*args, **kwargs)
              complexity_computer.compute(
                  self, list(args), out, module_name
              )
              return out
  
          def __repr__(self):
              return typestring
  
      return ComputeModule
  
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 6 for calling a global function with example usage: _patched_computation_module(module, complexity_computer, module_name) and returns: ComputeModule, ty, out, typestring