code: def open(self, mode=MODE_READ):
          
          if mode not in [MODE_READ, MODE_WRITE]:
              error = "Open mode must be '{}' or '{}'".format(
                  MODE_READ, MODE_WRITE)
              raise ValueError(error)
          self._openMode = mode
          if mode == MODE_READ:
              self.assertExists()
          if mode == MODE_READ:
              # This is part of the transitional behaviour where
              # we load the whole DB into memory to get access to
              # the data model.
              self.load()
docs: Opens this repo in the specified mode.
  
          TODO: figure out the correct semantics of this and document
          the intended future behaviour as well as the current
          transitional behaviour.