code: def check_env():
      assert "DMLC_ROLE" in os.environ and os.environ[
          "DMLC_ROLE"
      ].lower() in ["worker", "server", "scheduler"]
      required_envs = COMMON_REQUIRED_ENVS
      if os.environ["DMLC_ROLE"] == "worker":
          assert "DMLC_NUM_WORKER" in os.environ
          num_worker = int(os.environ["DMLC_NUM_WORKER"])
          assert num_worker >= 1
          if num_worker == 1:
              required_envs = []
          required_envs += WORKER_REQUIRED_ENVS
      for env in required_envs:
          if env not in os.environ:
              print("The env " + env + " is missing")
              os._exit(0)
  
file_path: byteps/launcher/launch.py
imports: from __future__ import print_function
  import os
  import re
  import subprocess
  import threading
  import sys
  import time
  from functools import reduce
label_desc: Use image node_id 2 for calling a global function with example usage: check_env() without return types