def kron(a, b):
    """Kronecker product of two TT-matrices or two TT-tensors"""
    if hasattr(a, '__kron__'):
        return a.__kron__(b)
    if a is None:
        return b
    else:
        raise ValueError(
            'Kron is waiting for two TT-tensors or two TT-matrices')
