code: def is_moe_tensor(tensor: torch.Tensor) -> bool:
      """
      Check whether the given tensor is a moe tensor.
  
      Args:
          tensor (torch.Tensor): The tensor to be checked.
  
      Returns:
          bool: Whether the given tensor is a moe tensor.
      """
      return hasattr(tensor, "moe_info")
  
file_path: ColossalAI/colossalai/tensor/moe_tensor/api.py
imports: from typing import List
  import torch
  import torch.distributed
  from torch.distributed import ProcessGroup
  from .moe_info import MoeParallelInfo
label_desc: Use image node_id 1 for calling a global function with example usage: is_moe_tensor(tensor) and returns: hasattr