code: def test_faster_gate(
      n_process, d_model, batch_size, n_expert, gpu_per_node, frac
  ):
      _run_distributed(
          "_test_faster_gate",
          n_process,
          {
              "d_model": d_model,
              "batch_size": batch_size,
              "n_expert": n_expert,
              "gpu_per_node": gpu_per_node,
              "frac": frac,
          },
          script=__file__,
          env=dict(
              FMOE_TOPO_GPUS_PER_NODE=str(gpu_per_node),
              FMOE_TOPO_OUTGOING_FRACTION=str(frac),
          ),
      )
  
file_path: smart-moe/tests/test_faster_gate.py
imports: import pytest
  import os
  import sys
  import json
  import math
  import torch
  import torch.distributed
  import torch.nn.functional
  from fmoe.gates.faster_gate import FasterGate
  from test_ddp import _ensure_initialized, _run_distributed
label_desc: Use image node_id 1 for calling a global function with example usage: test_faster_gate(n_process, d_model, batch_size, n_expert, gpu_per_node, frac) without return types