def METHOD_NAME():
  pdb_file = libtbx.env.under_dist('mmtbx', 'regression/pdbs/two_chains_ligand_water.pdb')
  base = "tst_table_one_counts"
  mtz_file = base + ".mtz"
  pdb_in = iotbx.pdb.input(pdb_file)
  xrs = pdb_in.xray_structure_simple()
  xrs.set_inelastic_form_factors(photon=1.54, table="sasaki")
  fc = abs(xrs.structure_factors(d_min=4.0).f_calc()).average_bijvoet_mates()
  fc.set_observation_type_xray_amplitude()
  fcs = fc.customized_copy(sigmas=flex.double(fc.size(), 10.0))
  flags = fcs.generate_r_free_flags()
  mtz = fcs.as_mtz_dataset(column_root_label="Fobs", wavelength=1.54)
  mtz.add_miller_array(flags, column_root_label="R-free-flags")
  mtz.mtz_object().write(mtz_file)
  params = """