code: def _call_trace(
      tracer: RemoteModuleTracer, module: nn.Module
  ) -> torch.fx.Graph:
      try:
          org_named_modules = RemoteModule.named_modules
          org_named_children = RemoteModule.named_children
          RemoteModule.named_modules = nn.Module.named_modules  # type: ignore
          RemoteModule.named_children = nn.Module.named_children  # type: ignore
          return tracer.trace(module)
      finally:
          RemoteModule.named_modules = org_named_modules  # type: ignore
          RemoteModule.named_children = org_named_children
  
file_path: fairscale/fairscale/experimental/nn/distributed_pipeline/trace.py
imports: import inspect
  import operator
  from typing import Dict, List, Optional, Tuple, cast
  from torch.distributed.nn import RemoteModule
  import torch.fx
  import torch.nn
  from .None import PipelineModulesGraph
label_desc: Use image node_id 1 for calling a global function with example usage: _call_trace(tracer, module) and returns: tracer