code: def test_with_static_covariates_univariate(self):
      ts = linear_timeseries(length=10)
      static_covs_series = pd.Series([0.0, 1.0], index=["st1", "st2"])
      static_covs_df = pd.DataFrame(
          [[0.0, 1.0]], columns=["st1", "st2"]
      )
  
      # check immutable
      ts.with_static_covariates(static_covs_series)
      assert not ts.has_static_covariates
  
      # from Series
      ts = ts.with_static_covariates(static_covs_series)
      assert ts.has_static_covariates
      np.testing.assert_almost_equal(
          ts.static_covariates_values(copy=False),
          np.expand_dims(static_covs_series.values, -1).T,
      )
      assert ts.static_covariates.index.equals(ts.components)
  
      # from DataFrame
      ts = ts.with_static_covariates(static_covs_df)
      assert ts.has_static_covariates
      np.testing.assert_almost_equal(
          ts.static_covariates_values(copy=False), static_covs_df.values
      )
      assert ts.static_covariates.index.equals(ts.components)
  
      # with None
      ts = ts.with_static_covariates(None)
      assert ts.static_covariates is None
      assert not ts.has_static_covariates
  
      # only pd.Series, pd.DataFrame or None
      with pytest.raises(ValueError):
          _ = ts.with_static_covariates([1, 2, 3])
  
      # multivariate does not work with univariate TimeSeries
      with pytest.raises(ValueError):
          static_covs_multi = pd.concat(
              [static_covs_series] * 2, axis=1
          ).T
          _ = ts.with_static_covariates(static_covs_multi)
  
imports: import copy
  import os
  import numpy
  import pandas
  import pytest
  from darts import TimeSeries, concatenate
  from darts.dataprocessing.transformers import BoxCox, Scaler
  from darts.timeseries import DEFAULT_GLOBAL_STATIC_COV_NAME, STATIC_COV_TAG
  from darts.utils.timeseries_generation import generate_index, linear_timeseries
label_desc: Use image node_id 3 for calling the TestTimeSeriesStaticCovariate obj's underlying member method code with example usage: obj.test_with_static_covariates_univariate() without return types