code: def parse_num_range(core_list):
      # core_list is a colon-seperated string. each section is the physical
      # core assignment for the corresponding byteps worker.
      # example input: 1,4-5,7-11,12:20-25
      # example output: [[[1], [4, 5], [7, 8, 9, 10, 11], [12]], [[20, 21, 22, 23, 24, 25]]]
      core_list = core_list.split(":")
      ret = []
      for item in core_list:
          temp = [
              (lambda sub: range(sub[0], sub[-1] + 1))(
                  list(map(int, elem.split("-")))
              )
              for elem in item.split(",")
          ]
          ret.append([list(a) for a in temp])
      return ret
  
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 4 for calling a global function with example usage: parse_num_range(core_list) and returns: ret