code: def open(self):
          
          if self.flag == "w":
              check_call(_LIB.MXRecordIOWriterCreate(self.uri, ctypes.byref(self.handle)))
              self.writable = True
          elif self.flag == "r":
              check_call(_LIB.MXRecordIOReaderCreate(self.uri, ctypes.byref(self.handle)))
              self.writable = False
          else:
              raise ValueError("Invalid flag %s"%self.flag)
          self.pid = current_process().pid
          self.is_open = True
docs: Opens the record file.