class_docstr: An abstract class for implementing invertible modules.
  
  Args:
      disable (bool, optional): If set to :obj:`True`, will disable the usage
          of :class:`InvertibleFunction` and will execute the module without
          memory savings. (default: :obj:`False`)
      num_bwd_passes (int, optional): Number of backward passes to retain a
          link with the output. After the last backward pass the output is
          discarded and memory is freed. (default: :obj:`1`)
class_docstr_tok: ["An","abstract","class","for","implementing","invertible","modules",".","Args",":","disable","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","will","disable","the","usage","of",":","class",":","`","InvertibleFunction","`","and","will","execute","the","module","without","memory","savings",".","(","default",":",":","obj",":","`","False","`",")","num_bwd_passes","(","int",",","optional",")",":","Number","of","backward","passes","to","retain","a","link","with","the","output",".","After","the","last","backward","pass","the","output","is","discarded","and","memory","is","freed",".","(","default",":",":","obj",":","`","1","`",")"]
code: def _fn_apply(self, args, fn, fn_inverse):
      if not self.disable:
          out = InvertibleFunction.apply(
              fn,
              fn_inverse,
              self.num_bwd_passes,
              len(args),
              *args,
              *tuple(p for p in self.parameters() if p.requires_grad),
          )
      else:
          out = fn(*args)
  
      # If the layer only has one input, we unpack the tuple:
      if isinstance(out, tuple) and len(out) == 1:
          return out[0]
  
      return out
  
imports: import copy
  from abc import ABC, abstractmethod
  from typing import Any, List, Optional, Union
  import numpy
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric.typing import Adj
label_desc: Use image node_id 6 for calling the InvertibleModule obj's underlying member method code with example usage: obj._fn_apply(args, fn, fn_inverse) and returns: out, out