@classmethod
def from_TN(cls, tn, inplace=False, **kwargs):
    """Construct a specific tensor network subclass (i.e. one with some
        promise about structure/geometry and tags/inds such as an MPS) from
        a generic tensor network which should have that structure already.

        Parameters
        ----------
        cls : class
            The TensorNetwork subclass to convert ``tn`` to.
        tn : TensorNetwork
            The TensorNetwork to convert.
        inplace : bool, optional
            Whether to perform the conversion inplace or not.
        kwargs
            Extra properties of the TN subclass that should be specified.
        """
    new_tn = tn if inplace else tn.copy()
    for prop in cls._EXTRA_PROPS:
        prop_name = prop.lstrip('_')
        if prop_name in kwargs:
            setattr(new_tn, prop, kwargs.pop(prop_name))
        elif hasattr(tn, prop_name):
            setattr(new_tn, prop, getattr(tn, prop_name))
        else:
            raise ValueError(
                f"You need to specify '{prop_name}' for the tensor network class {cls}, and ensure that it correctly corresponds to the structure of the tensor network supplied, since it cannot be found as an attribute on the TN: {tn}."
                )
    if kwargs:
        raise ValueError(f'Options {kwargs} are invalid for the class {cls}.')
    new_tn.__class__ = cls
    return new_tn
