def CleanGrant(grant):
  """Returns a "cleaned" grant by rounding properly the internal data.

  This insures that 2 grants coming from 2 different sources are actually
  identical, irrespective of the logging/storage precision used.
  """
  return grant._replace(latitude=round(grant.latitude, 6),
                        longitude=round(grant.longitude, 6),
                        height_agl=round(grant.height_agl, 2),
                        max_eirp=round(grant.max_eirp, 3))