def resolve_tweet(self, tweet):
        # The Twitter API allows tweet['coordinates'] to both be absent
        # and None, such that the key exists but has a None value.
        # "tweet.get('coordinates', {})" would return None in the latter
        # case, with None.get() in turn causing an AttributeError. (None
        # or {}), on the other hand, is {}, and {}.get() is okay.
        tweet_coordinates = (tweet.get('coordinates') or {}).get('coordinates')
        if not tweet_coordinates:
            return None
        tweet_coordinates = Point(longitude=tweet_coordinates[0],
                                  latitude=tweet_coordinates[1])
        closest_candidate = None
        closest_distance = float('inf')
        for cell in self._cells_for(tweet_coordinates.latitude,
                                    tweet_coordinates.longitude):
            for candidate in self.location_map[cell]:
                candidate_coordinates = Point(
                    candidate.latitude, candidate.longitude)
                distance = geopy_distance(
                    tweet_coordinates, candidate_coordinates).miles
                if closest_distance > distance:
                    closest_candidate = candidate
                    closest_distance = distance
        if self.max_distance < closest_distance:
            return (False, closest_candidate)
        return None
dataset/ETHPy150Open Kitware/minerva/server/libs/carmen/resolvers/geocode.py/GeocodeResolver.resolve_tweet/swapped operands of `<`