code: def all_gpus(visible_gpus=None):
      """
      Get integer ids of all available GPUs.
      """
      if visible_gpus is not None:
          os.environ["CUDA_VISIBLE_DEVICES"] = ",".join(
              str(gpu) for gpu in visible_gpus
          )
          return [int(gpu) for gpu in visible_gpus]
      devices = tf.config.experimental.list_physical_devices("GPU")
      LOGGER.info(
          " Visible GPUs: {{{}}}".format(
              ", ".join(
                  [
                      "{}:{}".format(
                          device.device_type, device.name
                      ).strip()
                      for device in devices
                  ]
              )
          )
      )
      if not devices:
          warnings.warn(
              "Failed to find available GPUS.  Falling back to CPU only mode."
          )
      device_ids = list(range(len(devices)))
      return device_ids
  
imports: import logging
  import os
  import os.path
  import warnings
  from collections import namedtuple
  from functools import lru_cache
  import numpy
  from nltk.metrics.distance import edit_distance
  import finetune
  from finetune.errors import FinetuneError
  from finetune.base_models import RoBERTa
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: all_gpus(visible_gpus) and returns: device_ids, unknown