'Closes the record file.'

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
