def METHOD_NAME(self, **kwargs):
    if kwargs["start_location"] and kwargs["end_location"]:
        clients = (
            MapboxDirectionsClient(),
            GoogleDirectionsClient(),
        )
        for client in clients:
            try:
                return client.get_route(
                    kwargs["start_location"], kwargs["end_location"]
                )
            except DirectionsException:
                pass
        return None
    return None