code: def _get_gpu_ids():
      if "CUDA_VISIBLE_DEVICES" in os.environ:
          return [
              int(x)
              for x in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(
                  ","
              )
          ]
      if platform.system() in ["Darwin", "Linux"]:
          return [
              int(d.replace("nvidia", ""))
              for d in os.listdir("/dev")
              if re.match("^nvidia\d+$", d)
          ]
      else:
          print(
              "Please set CUDA_VISIBLE_DEVICES (see http://acceleware.com/blog/cudavisibledevices-masking-gpus)"
          )
          return []
  
file_path: TensorLayer/tensorlayer/cli/train.py
imports: import argparse
  import json
  import multiprocessing
  import os
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: _get_gpu_ids() and returns: unknown, unknown, list