code: def __init__(
      self,
      *,
      choices: tp.Union[int, tp.Iterable[tp.Any]],
      repetitions: tp.Optional[int] = None,
      **kwargs: tp.Any,
  ) -> None:
      assert repetitions is None or isinstance(
          repetitions, int
      )  # avoid silent issues
      self._repetitions = repetitions
      # unroll iterables (includig Tuple instances or integers)
      lchoices = list(
          choices if not isinstance(choices, int) else range(choices)
      )
      if not lchoices:
          raise ValueError(
              "{self._class__.__name__} received an empty list of options."
          )
      super().__init__(choices=container.Tuple(*lchoices), **kwargs)
  
imports: import numpy
  import nevergrad.common.typing
  from .None import discretization
  from .None import core
  from .None import container
  from .None import _datalayers
  from .data import Array
label_desc: Use image node_id 1 to create a new BaseChoice object from inherited base classes: container with example: obj = BaseChoice()