code: def moe_set_seed(seed):
      if torch.cuda.is_available():
          from colossalai.legacy.core import global_context as gpc
  
          global_rank = gpc.get_global_rank()
          diff_seed = seed + global_rank
          add_seed(ParallelMode.TENSOR, diff_seed, True)
          print(
              f"moe seed condition: {global_rank} with tensor seed {diff_seed}",
              flush=True,
          )
  
file_path: colossalai/colossalai/legacy/context/random/_helper.py
imports: import functools
  from contextlib import contextmanager
  import torch.cuda
  from torch import Tensor
  from ..parallel_mode import ParallelMode
  from .seed_manager import SeedManager
label_desc: Use image node_id 10 for calling a global function with example usage: moe_set_seed(seed) without return types