<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def infer_location( self, location_query, max_distance, google_key, foursquare_client_id, foursquare_client_secret, limit ):
 """In-place location inferring of segments Returns: This track """

        self.segments = [
            segment.infer_location(
                location_query,
                max_distance,
                google_key,
                foursquare_client_id,
                foursquare_client_secret,
                limit
            )
            for segment in self.segments
            ]
        return self