code: def test_added_regressors(self, daily_univariate_ts, backend):
      m = Prophet(stan_backend=backend)
      m.add_regressor("binary_feature", prior_scale=0.2)
      m.add_regressor("numeric_feature", prior_scale=0.5)
      m.add_regressor(
          "numeric_feature2", prior_scale=0.5, mode="multiplicative"
      )
      m.add_regressor("binary_feature2", standardize=True)
      df = daily_univariate_ts.copy()
      df["binary_feature"] = ["0"] * 255 + ["1"] * 255
      df["numeric_feature"] = range(510)
      df["numeric_feature2"] = range(510)
      with pytest.raises(ValueError):
          # Require all regressors in df
          m.fit(df)
      df["binary_feature2"] = [1] * 100 + [0] * 410
      m.fit(df)
      # Check that standardizations are correctly set
      assert m.extra_regressors["binary_feature"] == {
          "prior_scale": 0.2,
          "mu": 0,
          "std": 1,
          "standardize": "auto",
          "mode": "additive",
      }
      assert m.extra_regressors["numeric_feature"]["prior_scale"] == 0.5
      assert m.extra_regressors["numeric_feature"]["mu"] == 254.5
      assert m.extra_regressors["numeric_feature"][
          "std"
      ] == pytest.approx(147.368585, abs=1e-5)
      assert (
          m.extra_regressors["numeric_feature2"]["mode"]
          == "multiplicative"
      )
      assert (
          m.extra_regressors["binary_feature2"]["prior_scale"] == 10.0
      )
      assert m.extra_regressors["binary_feature2"][
          "mu"
      ] == pytest.approx(0.1960784, abs=1e-5)
      assert m.extra_regressors["binary_feature2"][
          "std"
      ] == pytest.approx(0.3974183, abs=1e-5)
      # Check that standardization is done correctly
      df2 = m.setup_dataframe(df.copy())
      assert df2["binary_feature"][0] == 0
      assert df2["numeric_feature"][0] == pytest.approx(
          -1.726962, abs=1e-4
      )
      assert df2["binary_feature2"][0] == pytest.approx(
          2.022859, abs=1e-4
      )
      # Check that feature matrix and prior scales are correctly constructed
      (
          seasonal_features,
          prior_scales,
          component_cols,
          modes,
      ) = m.make_all_seasonality_features(df2)
      assert seasonal_features.shape[1] == 30
      names = ["binary_feature", "numeric_feature", "binary_feature2"]
      true_priors = [0.2, 0.5, 10.0]
      for i, name in enumerate(names):
          assert name in seasonal_features
          assert sum(component_cols[name]) == 1
          assert (
              sum(np.array(prior_scales) * component_cols[name])
              == true_priors[i]
          )
      # Check that forecast components are reasonable
      future = pd.DataFrame(
          {
              "ds": ["2014-06-01"],
              "binary_feature": [0],
              "numeric_feature": [10],
              "numeric_feature2": [10],
          }
      )
      # future dataframe also requires regressor values
      with pytest.raises(ValueError):
          m.predict(future)
      future["binary_feature2"] = 0
      fcst = m.predict(future)
      assert fcst.shape[1] == 37
      assert fcst["binary_feature"][0] == 0
      assert fcst["extra_regressors_additive"][0] == pytest.approx(
          fcst["numeric_feature"][0] + fcst["binary_feature2"][0]
      )
      assert fcst["extra_regressors_multiplicative"][
          0
      ] == pytest.approx(fcst["numeric_feature2"][0])
      assert fcst["additive_terms"][0] == pytest.approx(
          fcst["yearly"][0]
          + fcst["weekly"][0]
          + fcst["extra_regressors_additive"][0]
      )
      assert fcst["multiplicative_terms"][0] == pytest.approx(
          fcst["extra_regressors_multiplicative"][0]
      )
      assert fcst["yhat"][0] == pytest.approx(
          fcst["trend"][0] * (1 + fcst["multiplicative_terms"][0])
          + fcst["additive_terms"][0]
      )
  
imports: import numpy
  import pandas
  import pytest
  from prophet import Prophet
  from prophet.utilities import warm_start_params
label_desc: Use image node_id 1 for calling the TestProphetRegressors obj's underlying member method code with example usage: obj.test_added_regressors(daily_univariate_ts, backend) without return types