code: def run_moe_res_matmul_ds(residual, coef, output):
      global inference_module
      if inference_module is None:
          inference_module = InferenceBuilder().load()
      coef_t = coef.transpose(-1, -2).contiguous()
      return inference_module.moe_res_matmul(residual, coef_t, output)
  
file_path: DeepSpeed/tests/unit/ops/transformer/inference/test_moe_res_matmult.py
imports: import pytest
  import torch
  import deepspeed
  from deepspeed.accelerator import get_accelerator
  from deepspeed.ops.op_builder import InferenceBuilder
  from .inference_test_utils import allclose, get_dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: run_moe_res_matmul_ds(residual, coef, output) and returns: inference_module