code: def within_bounds(
          self,
          start: timelike,
          stop: timelike,
          bounds: Union[BaseGeometry, Tuple[float, float, float, float]],
      ) -> Optional[pd.DataFrame]:
          
  
          start = to_datetime(start)
          stop = to_datetime(stop)
  
          before_hour = round_time(start, "before")
          after_hour = round_time(stop, "after")
  
          try:
              # thinking of shapely bounds attribute (in this order)
              # I just don't want to add the shapely dependency here
              west, south, east, north = bounds.bounds  # type: ignore
          except AttributeError:
              west, south, east, north = bounds
  
          other_params = "and lon>={} and lon<={} ".format(west, east)
          other_params += "and lat>={} and lat<={} ".format(south, north)
  
          query = self.basic_request.format(
              columns="icao24, callsign, s.ITEM as serial, count(*) as count",
              other_tables=", state_vectors_data4.serials s",
              before_time=start.timestamp(),
              after_time=stop.timestamp(),
              before_hour=before_hour.timestamp(),
              after_hour=after_hour.timestamp(),
              other_params=other_params + "group by icao24, callsign, s.ITEM",
          )
  
          logging.info(f"Sending request: {query}")
          df = self._impala(query, columns="icao24, callsign, serial, count")
          if df is None:
              return None
  
          df = df[df["count"] != "count"]
          df["count"] = df["count"].astype(int)
  
          return df
docs: EXPERIMENTAL.