code: def test_conditional_custom_seasonality(
      self, daily_univariate_ts, backend
  ):
      m = Prophet(
          weekly_seasonality=False,
          yearly_seasonality=False,
          stan_backend=backend,
      )
      m.add_seasonality(
          name="conditional_weekly",
          period=7,
          fourier_order=3,
          prior_scale=2.0,
          condition_name="is_conditional_week",
      )
      m.add_seasonality(
          name="normal_monthly",
          period=30.5,
          fourier_order=5,
          prior_scale=2.0,
      )
      df = daily_univariate_ts.copy()
      with pytest.raises(ValueError):
          # Require all conditions names in df
          m.fit(df)
      df["is_conditional_week"] = [0] * 255 + [2] * 255
      with pytest.raises(ValueError):
          # Require boolean compatible values
          m.fit(df)
      df["is_conditional_week"] = [0] * 255 + [1] * 255
      m.fit(df)
      assert m.seasonalities["conditional_weekly"] == {
          "period": 7,
          "fourier_order": 3,
          "prior_scale": 2.0,
          "mode": "additive",
          "condition_name": "is_conditional_week",
      }
      assert m.seasonalities["normal_monthly"]["condition_name"] is None
      (
          seasonal_features,
          prior_scales,
          component_cols,
          modes,
      ) = m.make_all_seasonality_features(m.history)
      # Confirm that only values without is_conditional_week has non zero entries
      condition_cols = [
          c
          for c in seasonal_features.columns
          if c.startswith("conditional_weekly")
      ]
      assert np.array_equal(
          (seasonal_features[condition_cols] != 0).any(axis=1).values,
          df["is_conditional_week"].values,
      )
  
imports: import numpy
  import pandas
  import pytest
  from prophet import Prophet
  from prophet.utilities import warm_start_params
label_desc: Use image node_id 5 for calling the TestProphetCustomSeasonalComponent obj's underlying member method code with example usage: obj.test_conditional_custom_seasonality(daily_univariate_ts, backend) without return types