docs: def compute_trip_activity(feed: "Feed", dates: List[str]) -> DataFrame:
      """
      Mark trip as active or inactive on the given dates as computed
      by :func:`is_active_trip`.
  
      Parameters
      ----------
      feed : Feed
      dates : string or list
          A YYYYMMDD date string or list thereof indicating the date(s)
          for which to compute activity
  
      Returns
      -------
      DataFrame
          Columns are
  
          - ``'trip_id'``
          - ``dates[0]``: 1 if the trip is active on ``dates[0]``;
            0 otherwise
          - ``dates[1]``: 1 if the trip is active on ``dates[1]``;
            0 otherwise
          - etc.
          - ``dates[-1]``: 1 if the trip is active on ``dates[-1]``;
            0 otherwise
  
          If ``dates`` is ``None`` or the empty list, then return an
          empty DataFrame.
  
      Notes
      -----
      Assume the following feed attributes are not ``None``:
  
      - ``feed.trips``
      - Those used in :func:`is_active_trip`
  
      """
      dates = feed.restrict_dates(dates)
      if not dates:
          return pd.DataFrame()
  
      f = feed.trips.copy()
      for date in dates:
          f[date] = f["trip_id"].map(
              lambda trip_id: int(feed.is_active_trip(trip_id, date))
          )
      return f[["trip_id"] + list(dates)]