parameters: (self, buf)
docstring: Inserts a string buffer as a record.
  
          Example usage:
          ----------
          >>> record = mx.recordio.MXRecordIO('tmp.rec', 'w')
          >>> for i in range(5):
          ...    record.write('record_%d'%i)
          >>> record.close()
  
          Parameters
          ----------
          buf : string (python2), bytes (python3)
              Buffer to write.
docstring_summary: Inserts a string buffer as a record.
docstring_tokens: Inserts a string buffer as a record .
function: def write(self, buf):
          """Inserts a string buffer as a record.
  
          Example usage:
          ----------
          >>> record = mx.recordio.MXRecordIO('tmp.rec', 'w')
          >>> for i in range(5):
          ...    record.write('record_%d'%i)
          >>> record.close()
  
          Parameters
          ----------
          buf : string (python2), bytes (python3)
              Buffer to write.
          """
          assert self.writable
          check_call(_LIB.MXRecordIOWriterWriteRecord(self.handle,
                                                      ctypes.c_char_p(buf),
                                                      ctypes.c_size_t(len(buf))))
function_tokens: def write ( self , buf ) : assert self . writable check_call ( _LIB . MXRecordIOWriterWriteRecord ( self . handle , ctypes . c_char_p ( buf ) , ctypes . c_size_t ( len ( buf ) ) ) )