def write_id(fid, kind, id_=None):
 id_ = (_generate_meas_id() if (id_ is None) else id_)
 data_size = (5 * 4)
 fid.write(np.array(kind, dtype='>i4').tostring())
 fid.write(np.array(FIFF.FIFFT_ID_STRUCT, dtype='>i4').tostring())
 fid.write(np.array(data_size, dtype='>i4').tostring())
 fid.write(np.array(FIFF.FIFFV_NEXT_SEQ, dtype='>i4').tostring())
 arr = np.array([id_['version'], id_['machid'][0], id_['machid'][1], id_['secs'], id_['usecs']], dtype='>i4')
 fid.write(arr.tostring())

def write_id ( fid , kind , id_ = None ) : id_ = ( _generate_meas_id ( ) if ( id_ is None ) else id_ ) data_size = ( 5 * 4 ) fid . write ( np . array ( kind , dtype = '>i4' ) . tostring ( ) ) fid . write ( np . array ( FIFF . FIFFT_ID_STRUCT , dtype = '>i4' ) . tostring ( ) ) fid . write ( np . array ( data_size , dtype = '>i4' ) . tostring ( ) ) fid . write ( np . array ( FIFF . FIFFV_NEXT_SEQ , dtype = '>i4' ) . tostring ( ) ) arr = np . array ( [ id_ [ 'version' ] , id_ [ 'machid' ] [ 0 ] , id_ [ 'machid' ] [ 1 ] , id_ [ 'secs' ] , id_ [ 'usecs' ] ] , dtype = '>i4' ) fid . write ( arr . tostring ( ) )
write fiff id .