def METHOD_NAME(self):
    if self.lat is None or self.lon is None or self.accuracy is None:
        return {"position": {"source": "query"}}
    return {
        "position": {
            "latitude": self.lat,
            "longitude": self.lon,
            "accuracy": self.accuracy,
            "source": "query",
        }
    }