def METHOD_NAME(self, shares=0.8):
    """ Calculate split into train, test and validation subsets
    Parameters
    ----------
    shares : float or a sequence of floats
        A share of train, test and validation subset respectively.
    Returns
    -------
    a tuple which contains number of items in train, test and validation subsets
    Raises
    ------
    ValueError
        * if shares has more than 3 items
        * if sum of shares is greater than 1
        * if this set does not have enough items to split
    Examples
    --------
    Split into train / test in 80/20 ratio
    >>> some_set.calc_split()
    Split into train / test / validation in 60/30/10 ratio
    >>> some_set.calc_split([0.6, 0.3])
    Split into train / test / validation in 50/30/20 ratio
    >>> some_set.calc_split([0.5, 0.3, 0.2])
    """
    _shares = [shares] if isinstance(shares, (int, float)) else shares
    _shares = _shares if len(_shares) > 2 else _shares + [.0]
    _shares = np.array(_shares).ravel()         # pylint: disable=no-member
    n_items = len(self)
    if _shares.shape[0] > 3:
        raise ValueError("Shares must have no more than 3 elements")
    if _shares.sum() > 1:
        raise ValueError("Shares must sum to 1:", shares)
    if n_items < len(_shares):
        raise ValueError(f"A set of size {n_items} cannot be split into {len(_shares)} subsets")
    _shares[-1] = 1 - _shares[:-1].sum()
    if _shares[-1] == 0:
        _shares = _shares[:-1]
    _lens = np.round(_shares * n_items).astype('int')
    for s, _ in enumerate(_shares):
        _lens[s] = _lens[s] if _shares[s] > 0 and _lens[s] >= 1 else 1
    _lens = np.pad(_lens, (0, 3 - len(_lens)), 'constant')
    train_len, test_len, valid_len = _lens
    train_len = max(0, n_items - test_len - valid_len)
    return train_len, test_len, valid_len