code: def get_numa_cores():
      ret = []
      output = subprocess.check_output(
          ["numactl", "--hardware"]
      ).decode("utf-8")
      lines = output.split("\n")
      for line in lines:
          if line.startswith("available:"):
              num_numas = int(line.split(" ")[1])
              break
      for numa in range(num_numas):
          for line in lines:
              if line.startswith(f"node {numa} cpus:"):
                  cores = line.split(" ")[3:]
                  ret.append([int(core) for core in cores])
      return ret
  
file_path: deepspeed/deepspeed/utils/numa.py
imports: import distutils
  import os
  import psutil
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: get_numa_cores() and returns: ret