def write_forward_meas_info(fid, info):
 info._check_consistency()
 start_block(fid, FIFF.FIFFB_MNE_PARENT_MEAS_FILE)
 write_string(fid, FIFF.FIFF_MNE_FILE_NAME, info['meas_file'])
 if (info['meas_id'] is not None):
  write_id(fid, FIFF.FIFF_PARENT_BLOCK_ID, info['meas_id'])
 meg_head_t = info.get('dev_head_t', info.get('ctf_head_t'))
 if (meg_head_t is None):
  fid.close()
  raise ValueError('Head<-->sensor transform not found')
 write_coord_trans(fid, meg_head_t)
 if ('chs' in info):
  write_int(fid, FIFF.FIFF_NCHAN, len(info['chs']))
  for (k, c) in enumerate(info['chs']):
   c = deepcopy(c)
   c['scanno'] = (k + 1)
   write_ch_info(fid, c)
 if (('bads' in info) and (len(info['bads']) > 0)):
  start_block(fid, FIFF.FIFFB_MNE_BAD_CHANNELS)
  write_name_list(fid, FIFF.FIFF_MNE_CH_NAME_LIST, info['bads'])
  end_block(fid, FIFF.FIFFB_MNE_BAD_CHANNELS)
 end_block(fid, FIFF.FIFFB_MNE_PARENT_MEAS_FILE)

def write_forward_meas_info ( fid , info ) : info . _check_consistency ( ) start_block ( fid , FIFF . FIFFB_MNE_PARENT_MEAS_FILE ) write_string ( fid , FIFF . FIFF_MNE_FILE_NAME , info [ 'meas_file' ] ) if ( info [ 'meas_id' ] is not None ) : write_id ( fid , FIFF . FIFF_PARENT_BLOCK_ID , info [ 'meas_id' ] ) meg_head_t = info . get ( 'dev_head_t' , info . get ( 'ctf_head_t' ) ) if ( meg_head_t is None ) : fid . close ( ) raise ValueError ( 'Head<-->sensor transform not found' ) write_coord_trans ( fid , meg_head_t ) if ( 'chs' in info ) : write_int ( fid , FIFF . FIFF_NCHAN , len ( info [ 'chs' ] ) ) for ( k , c ) in enumerate ( info [ 'chs' ] ) : c = deepcopy ( c ) c [ 'scanno' ] = ( k + 1 ) write_ch_info ( fid , c ) if ( ( 'bads' in info ) and ( len ( info [ 'bads' ] ) > 0 ) ) : start_block ( fid , FIFF . FIFFB_MNE_BAD_CHANNELS ) write_name_list ( fid , FIFF . FIFF_MNE_CH_NAME_LIST , info [ 'bads' ] ) end_block ( fid , FIFF . FIFFB_MNE_BAD_CHANNELS ) end_block ( fid , FIFF . FIFFB_MNE_PARENT_MEAS_FILE )
write measurement info stored in forward solution .