code: def write_crmod_config(self, filename):
          
          ABMN = self._get_crmod_abmn()
  
          with open(filename, 'wb') as fid:
              fid.write(bytes(
                  '{0}\n'.format(ABMN.shape[0]),
                  'utf-8',
              ))
              np.savetxt(fid, ABMN.astype(int), fmt='%i %i')
docs: Write the configurations to a configuration file in the CRMod format
          All configurations are merged into one previor to writing to file
  
          Parameters
          ----------
          filename: string
              absolute or relative path to output filename (usually config.dat)