code: def test_prophet_model_with_logistic_growth(self):
      model = Prophet(growth="logistic", cap=1)
  
      # Create timeseries with logistic function
      times = tg.generate_index(
          pd.Timestamp("20200101"), pd.Timestamp("20210101"), freq="D"
      )
      values = np.linspace(-10, 10, len(times))
      f = np.vectorize(lambda x: 1 / (1 + np.exp(-x)))
      values = f(values)
      ts = TimeSeries.from_times_and_values(times, values, freq="D")
      # split in the middle, so the only way of predicting the plateau correctly
      # is using the capacity
      train, val = ts.split_after(0.5)
  
      model.fit(train)
      pred = model.predict(len(val))
  
      for val_i, pred_i in zip(
          val.univariate_values(), pred.univariate_values()
      ):
          assert abs(val_i - pred_i) < 0.1
  
file_path: darts/darts/tests/models/forecasting/test_prophet.py
imports: from unittest.mock import Mock
  import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.logging import get_logger
  from darts.models import NotImportedModule, Prophet
  from darts.utils import timeseries_generation
label_desc: Use image node_id 6 for calling the TestProphet obj's underlying member method code with example usage: obj.test_prophet_model_with_logistic_growth() without return types