code: def accelerator_counts(
      accel: Accelerator, machine_type: Optional[MachineType] = None
  ) -> Set[int]:
      """Returns the set of Accelerator count numbers valid for the supplied machine
      type.
  
      If machine_type is None, returns the set of valid counts for the supplied
      accelerator on ANY machine type.
  
      """
      ret = set()
      for mt, counts in _AccelMTCount[accel].items():
          if machine_type is None or mt == machine_type:
              ret = ret.union(counts)
  
      return ret
  
imports: import argparse
  from enum import Enum
  from typing import Callable, List, NamedTuple, Optional, Set, Union
  import caliban.util
label_desc: Use image node_id 5 for calling a global function with example usage: accelerator_counts(accel, machine_type) and returns: ret