def get_recent_locations(self, max_results=10):
        if self.get_active_participation() and self.get_active_participation().role == 'driver':
            current_participation = self.get_active_participation()
            recent_locations = list(current_participation.locations.filter().only("id","georss_point").order_by('-id')[:max_results])
        else:
            recent_locations = list(self.locations.filter().only("id","georss_point").order_by('-id')[:max_results])
        recent_locations.reverse()
        return recent_locations
Returns the last n locations of a Person. If the person is participating
dataset/ETHPy150Open dgraziotin/dycapo/server/models/person.py/Person.get_recent_locations