def METHOD_NAME(code,d_min, anomalous_flag = False):
    #pdbtools.run([file, "high_resolution=%f"%self.d_min, "label=f-obs-nks"
    #              "k_sol=0.35", "b_sol=60", "b_cart=1 2 -3 0 0 0", "--f_model", "r_free=0.1"])
    # get xray_structure
    pdb_url = iotbx.pdb.fetch.fetch(id=code)
    pdb_input = pdb.input(source_info=None,lines=pdb_url.readlines())
    xray_structure = pdb_input.xray_structure_simple()
    phil2 = mmtbx.command_line.fmodel.fmodel_from_xray_structure_master_params
    params2 = phil2.extract()
    # adjust the cutoff of the generated intensities to assure that
    # statistics will be reported to the desired high-resolution limit
    # even if the observed unit cell differs slightly from the reference.
    ISO_ALLOWANCE = 0.1 # isomorphous recip cell volume changes no more than 10%
    params2.high_resolution = d_min / math.pow( (1.+ISO_ALLOWANCE),(1./3.) )
    params2.output.type = "real"
    if True :
      params2.fmodel.k_sol = 0.35
      params2.fmodel.b_sol = 46
    f_model = mmtbx.utils.fmodel_from_xray_structure(
      xray_structure = xray_structure,
      f_obs          = None,
      add_sigmas     = True,
      params         = params2).f_model
    i_model = f_model.as_intensity_array()
    return  i_model.map_to_asu()