@classmethod
def from_state(cls, file_or_stateobj, **init_kwargs):
    """
        Create a new TMPreproc instance by loading a state from by loading either a pickled state from disk as saved
        with :meth:`~TMPreproc.save_state` or by loading a state object directly.

        :param file_or_stateobj: either path to a pickled file as saved with :meth:`~TMPreproc.save_state` or a
                                 state object
        :param init_kwargs: dict of arguments passed to :meth:`~TMPreproc.__init__`
        :return: new instance as restored from the passed file / object
        """
    if 'docs' in init_kwargs.keys():
        raise ValueError(
            '`docs` cannot be passed as argument when loading state')
    init_kwargs['docs'] = None
    return cls(**init_kwargs).load_state(file_or_stateobj)
