code: def save(self, file_name, model_name='default', overwrite=False, save_streaming_chain=False):
          r
          from pyemma._base.serialization.h5file import H5File
          try:
              with H5File(file_name=file_name, mode='a') as f:
                  f.add_serializable(model_name, obj=self, overwrite=overwrite, save_streaming_chain=save_streaming_chain)
          except Exception as e:
              msg = ('During saving the object {obj}") '
                     'the following error occurred: {error}'.format(obj=self, error=e))
              if isinstance(self, Loggable):
                  self.logger.exception(msg)
              else:
                  logger.exception(msg)
              raise
docs: r""" saves the current state of this object to given file and name.
  
          Parameters
          -----------
          file_name: str
              path to desired output file
          model_name: str, default='default'
              creates a group named 'model_name' in the given file, which will contain all of the data.
              If the name already exists, and overwrite is False (default) will raise a RuntimeError.
          overwrite: bool, default=False
              Should overwrite existing model names?
          save_streaming_chain : boolean, default=False
              if True, the data_producer(s) of this object will also be saved in the given file.
  
          Examples
          --------
          >>> import pyemma, numpy as np
          >>> from pyemma.util.contexts import named_temporary_file
          >>> m = pyemma.msm.MSM(P=np.array([[0.1, 0.9], [0.9, 0.1]]))
  
          >>> with named_temporary_file() as file: # doctest: +SKIP
          ...    m.save(file, 'simple') # doctest: +SKIP
          ...    inst_restored = pyemma.load(file, 'simple') # doctest: +SKIP
          >>> np.testing.assert_equal(m.P, inst_restored.P) # doctest: +SKIP