@staticmethod
def free_dum_from_indices(*indices):
    """
        Convert ``indices`` into ``free``, ``dum`` for single component tensor

        ``free``     list of tuples ``(index, pos, 0)``,
                     where ``pos`` is the position of index in
                     the list of indices formed by the component tensors

        ``dum``      list of tuples ``(pos_contr, pos_cov, 0, 0)``

        Examples
        ========

        >>> Lorentz = TensorIndexType('Lorentz', dummy_fmt='L')
        >>> m0, m1, m2, m3 = tensor_indices('m0 m1 m2 m3', Lorentz)
        >>> TIDS.free_dum_from_indices(m0, m1, -m1, m3)
        ([(m0, 0, 0), (m3, 3, 0)], [(1, 2, 0, 0)])

        """
    n = len(indices)
    if n == 1:
        return [(indices[0], 0, 0)], []
    free = [True] * len(indices)
    index_dict = {}
    dum = []
    for i, index in enumerate(indices):
        name = index._name
        typ = index._tensortype
        contr = index._is_up
        if (name, typ) in index_dict:
            is_contr, pos = index_dict[name, typ]
            if is_contr:
                if contr:
                    raise ValueError(
                        f'two equal contravariant indices in slots {pos:d} and {i:d}'
                        )
                else:
                    free[pos] = False
                    free[i] = False
            elif contr:
                free[pos] = False
                free[i] = False
            else:
                raise ValueError(
                    f'two equal covariant indices in slots {pos:d} and {i:d}')
            if contr:
                dum.append((i, pos, 0, 0))
            else:
                dum.append((pos, i, 0, 0))
        else:
            index_dict[name, typ] = index._is_up, i
    free = [(index, i, 0) for i, index in enumerate(indices) if free[i]]
    free.sort()
    return free, dum
