docs: def _prune_trains(self, trains, direction=None,
                        destination=None, stops_at=None):
          """Only return the data matching direction and / or destination.
          If stops_at is set this may do a number of extra HTTP requests
          @param trains list of trains to filter
          @param direction Filter by train direction. Northbound or Southbound
          @param destination Filter by name of the destination stations
          @param stops_at Filber by name of one of the stops
          """
          pruned_data = []
          for train in trains:
              append = True
              if direction is not None and train["direction"] != direction:
                  append = False
  
              if destination is not None and train["destination"] != destination:
                  append = False
  
              if append and stops_at is not None:
                  if stops_at != train['destination']:
                      stops = self.get_train_stops(train["code"])
                      for stop in stops:
                          append = False
                          if stop["location"] == stops_at:
                              append = True
                              break
  
              if append:
                  pruned_data.append(train)
  
          return pruned_data