def METHOD_NAME():
  """
  Exercise maptbx.target_and_gradients_diffmap .
  """
  xrs = get_xrs()
  map_data, f_calc = get_map(xrs=xrs)
  tg = maptbx.target_and_gradients_diffmap(
    unit_cell   = xrs.unit_cell(),
    map_target  = map_data,
    map_current = map_data,
    step        = 0.3,
    sites_frac  = xrs.sites_frac())
  assert approx_equal(xrs.sites_cart(), [[0,0,0]])
  assert approx_equal(tg.target(), 0)
  assert approx_equal(list(tg.gradients()), [[0,0,0]])
  xrs = xrs.translate(x=0.3, y=-0.5, z=0.7)
  assert approx_equal(xrs.sites_cart(), [[0.3,-0.5,0.7]])
  map_current, f_calc = get_map(xrs=xrs)
  tg = maptbx.target_and_gradients_diffmap(
    unit_cell   = xrs.unit_cell(),
    map_target  = map_data,
    map_current = map_current,
    step        = 0.3,
    sites_frac  = xrs.sites_frac())
  assert tg.target() > 0
  for g in tg.gradients():
    for g_ in g:
      assert abs(g_)>0.