code: def close(self):
          
          if not self.is_open:
              return
          if self.writable:
              check_call(_LIB.MXRecordIOWriterFree(self.handle))
          else:
              check_call(_LIB.MXRecordIOReaderFree(self.handle))
          self.is_open = False
          self.pid = None
docs: Closes the record file.