code: def _get_all_available_gpus(
      include_cuda: bool = False, include_mps: bool = False
  ) -> List[int]:
      """
      Returns:
          A list of all available GPUs
      """
      from lightning.fabric.accelerators.cuda import (
          _get_all_visible_cuda_devices,
      )
      from lightning.fabric.accelerators.mps import (
          _get_all_available_mps_gpus,
      )
  
      cuda_gpus = (
          _get_all_visible_cuda_devices() if include_cuda else []
      )
      mps_gpus = _get_all_available_mps_gpus() if include_mps else []
      return cuda_gpus + mps_gpus
  
file_path: pytorch-lightning/src/lightning/fabric/utilities/device_parser.py
imports: from typing import List, MutableSequence, Optional, Tuple, Union
  import torch
  from lightning.fabric.utilities.exceptions import MisconfigurationException
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 6 for calling a global function with example usage: _get_all_available_gpus(include_cuda, include_mps) and returns: unknown