def is_subset(subsampling, reference):
    """Return whether indices specified by ``subsampling`` are subset of the reference.

    Args:
        subsampling ([int] or None): Sample indices
        reference ([int] or None): Reference set.

    Returns:
        bool: Whether all indices are contained in the reference set.
    """
    if reference is None:
        return True
    elif subsampling is None and reference is not None:
        return False
    else:
        return set(subsampling).issubset(set(reference))