code: def get_tensor_and_expert_parallel_world_size():
      """Return world size for the expert model parallel group times model parallel group.
      Currently, each expert will also be distributed across TP group by default.
      """
      if (
          torch.distributed.is_available()
          and torch.distributed.is_initialized()
      ):
          tensor_and_expert_parallel_world_size = (
              torch.distributed.get_world_size(
                  group=get_tensor_and_expert_parallel_group()
              )
          )
          return tensor_and_expert_parallel_world_size
      else:
          return 0
  
imports: import os
  from typing import Optional
  import torch
  from .utils import GlobalMemoryBuffer
label_desc: Use image node_id 50 for calling a global function with example usage: get_tensor_and_expert_parallel_world_size() and returns: tensor_and_expert_parallel_world_size, int