code: def _normalize_parse_gpu_input_to_list(
      gpus: Union[int, List[int], Tuple[int, ...]],
      include_cuda: bool,
      include_mps: bool,
  ) -> Optional[List[int]]:
      assert gpus is not None
      if isinstance(gpus, (MutableSequence, tuple)):
          return list(gpus)
  
      # must be an int
      if not gpus:  # gpus==0
          return None
      if gpus == -1:
          return _get_all_available_gpus(
              include_cuda=include_cuda, include_mps=include_mps
          )
  
      return list(range(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 5 for calling a global function with example usage: _normalize_parse_gpu_input_to_list(gpus, include_cuda, include_mps) and returns: list, list, None, _get_all_available_gpus