class_docstr: Accelerator for NVIDIA CUDA devices.
class_docstr_tok: ["Accelerator","for","NVIDIA","CUDA","devices","."]
docstr: Accelerator device parsing logic.
docstr_tok: ["Accelerator","device","parsing","logic","."]
code: def parse_devices(
      devices: Union[int, str, List[int]]
  ) -> Optional[List[int]]:
      """Accelerator device parsing logic."""
      from lightning.fabric.utilities.device_parser import (
          _parse_gpu_ids,
      )
  
      return _parse_gpu_ids(devices, include_cuda=True)
  
imports: import os
  import warnings
  from contextlib import contextmanager
  from functools import lru_cache
  from typing import Generator, List, Optional, Union, cast
  import torch
  from typing_extensions import override
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.accelerators.registry import _AcceleratorRegistry
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.fabric.utilities.rank_zero import rank_zero_info
label_desc: Use image node_id 3 for calling the CUDAAccelerator obj's underlying member method code with example usage: obj.parse_devices(devices) and returns: _parse_gpu_ids