code: def canonical_gpu_indices(indices):
      """
      If ``indices`` is not None, cast it to list of int.
      """
      if isinstance(indices, str):
          return [int(idx) for idx in indices.split(",")]
      if isinstance(indices, int):
          return [indices]
      return indices
  
file_path: nni/nni/experiment/config/utils/public.py
imports: import dataclasses
  import math
  from pathlib import Path
  from typing import Union
label_desc: Use image node_id 2 for calling a global function with example usage: canonical_gpu_indices(indices) and returns: indices, unknown, list