code: def init_data_model_parallel(group_count=1, backend="nccl"):
      from tutel import net as C
  
      result = C.create_groups_from_world(
          group_count=group_count, include_init=backend
      )
      result.is_cuda = result.local_device.type == "cuda"
  
      logging.critical(
          f"Registering device global rank {result.global_rank}: data_rank = {result.data_rank}, model_rank = {result.model_rank}"
      )
      init_data_model_parallel.default_env = result
  
      def on_quit():
          sys.stdout.flush()
          sys.stderr.flush()
          # Builtin dist.all_to_all_single in torch is unstable in some versions.
          # Temp work around: https://github.com/pytorch/pytorch/issues/56390
          if getattr(C.simple_all_to_all, "_use_builtins", False):
              os._exit(0)
  
      import atexit
  
      atexit.register(lambda *args: on_quit())
      return result
  
file_path: tutel/tutel/system.py
imports: import os, sys
  import re
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: init_data_model_parallel(group_count, backend) and returns: result