(index)
return index
check if the given indexes are legal.

    Parameters
    ----------
    index: list or np.ndarray
        index of the data.
check if the given indexes are legal.
check if the given indexes are legal .
def check_index_multilabel(index):
    """check if the given indexes are legal.

    Parameters
    ----------
    index: list or np.ndarray
        index of the data.
    """
    if isinstance(index, BaseCollection):
        return index
    if not isinstance(index, (list, np.ndarray)):
        index = [index]
    datatype = collections.Counter([type(i) for i in index])
    if len(datatype) != 1:
        raise TypeError("Different types found in the given indexes.")
    if not datatype.popitem()[0] == tuple:
        raise TypeError("Each index should be a tuple.")
    return index
def check_index_multilabel ( index ) : if isinstance ( index , BaseCollection ) : return index if not isinstance ( index , ( list , np . ndarray ) ) : index = [ index ] datatype = collections . Counter ( [ type ( i ) for i in index ] ) if len ( datatype ) != 1 : raise TypeError ( "Different types found in the given indexes." ) if not datatype . popitem ( ) [ 0 ] == tuple : raise TypeError ( "Each index should be a tuple." ) return index