class_docstr: Tracer with an extended set of leaf nn.Modules.
docstr: Initializes a new _ExtendedLeafTracer object.
  
  Args:
      leaf_modules: The set of extra nn.Modules instances which will not be traced
          through but instead considered to be leaves.
docstr_tok: ["Initializes","a","new","_ExtendedLeafTracer","object",".","Args",":","leaf_modules",":","The","set","of","extra","nn.Modules","instances","which","will","not","be","traced","through","but","instead","considered","to","be","leaves","."]
code: def __init__(self, leaf_modules: Set[torch.nn.Module]):
      """Initializes a new _ExtendedLeafTracer object.
  
      Args:
          leaf_modules: The set of extra nn.Modules instances which will not be traced
              through but instead considered to be leaves.
      """
      super().__init__()
      self.leaf_modules = leaf_modules
  
file_path: fairscale/fairscale/experimental/nn/auto_shard.py
imports: import logging
  from typing import Dict, List, Set
  import torch
  import torch.fx
  from torch.fx.node import Node
label_desc: Use image node_id 1 to create a new _ExtendedLeafTracer object from inherited base classes: torch.fx with example: obj = _ExtendedLeafTracer(leaf_modules)