def _get_size(hyper):
    """ return the number of choices from 'something',
    something can be either an hyper-parameter but also a constant or a tuple

    This allow implicite use of list/tuple to model a choice and object to model a constant

    """
    if hasattr(hyper, 'size'):
        return hyper.size
    elif isinstance(hyper, (list, tuple)):
        return len(hyper)
    elif hasattr(hyper, 'rvs'):
        return 10
    else:
        return 1
