parameters: (self, file)
docstring: Load a State file that was created with saveState().
  
          Parameters
          ----------
          file : string or file
              a File-like object to load the state from, or alternatively a
              filename
docstring_summary: Load a State file that was created with saveState().
docstring_tokens: Load a State file that was created with saveState () .
function: def loadState(self, file):
          """Load a State file that was created with saveState().
  
          Parameters
          ----------
          file : string or file
              a File-like object to load the state from, or alternatively a
              filename
          """
          if isinstance(file, str):
              with open(file, 'r') as f:
                  xml = f.read()
          else:
              xml = file.read()
          self.context.setState(mm.XmlSerializer.deserialize(xml))
function_tokens: def loadState ( self , file ) : if isinstance ( file , str ) : with open ( file , 'r' ) as f : xml = f . read ( ) else : xml = file . read ( ) self . context . setState ( mm . XmlSerializer . deserialize ( xml ) )