code: def get_devices(gpu_ids):
      """Get device."""
      if gpu_ids is not None:
          gpu_ids = [f"/gpu:{gpu}" for gpu in gpu_ids.split(",")]
          cpu_ids = [
              f'/cpu:{x.name.split(":")[-1]}'
              for x in tf.config.list_physical_devices("CPU")
          ]
          device_ids = [*cpu_ids, *gpu_ids]
      else:
          device_ids = None
      return device_ids
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/utils/tf_utils.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: get_devices(gpu_ids) and returns: device_ids