code: def test_prophet_valid():
      df = prophet(
          df=prophet_df,
          time_grain="P1M",
          periods=3,
          confidence_interval=0.9,
      )
      columns = {column for column in df.columns}
      assert columns == {
          DTTM_ALIAS,
          "a__yhat",
          "a__yhat_upper",
          "a__yhat_lower",
          "a",
          "b__yhat",
          "b__yhat_upper",
          "b__yhat_lower",
          "b",
      }
      assert df[DTTM_ALIAS].iloc[0].to_pydatetime() == datetime(
          2018, 12, 31
      )
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 3, 31
      )
      assert len(df) == 7
  
      df = prophet(
          df=prophet_df,
          time_grain="P1M",
          periods=5,
          confidence_interval=0.9,
      )
      assert df[DTTM_ALIAS].iloc[0].to_pydatetime() == datetime(
          2018, 12, 31
      )
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 5, 31
      )
      assert len(df) == 9
  
      df = prophet(
          df=pd.DataFrame(
              {
                  "__timestamp": [
                      datetime(2022, 1, 2),
                      datetime(2022, 1, 9),
                  ],
                  "x": [1, 1],
              }
          ),
          time_grain="P1W",
          periods=1,
          confidence_interval=0.9,
      )
  
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 1, 16
      )
      assert len(df) == 3
  
      df = prophet(
          df=pd.DataFrame(
              {
                  "__timestamp": [
                      datetime(2022, 1, 2),
                      datetime(2022, 1, 9),
                  ],
                  "x": [1, 1],
              }
          ),
          time_grain="1969-12-28T00:00:00Z/P1W",
          periods=1,
          confidence_interval=0.9,
      )
  
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 1, 16
      )
      assert len(df) == 3
  
      df = prophet(
          df=pd.DataFrame(
              {
                  "__timestamp": [
                      datetime(2022, 1, 3),
                      datetime(2022, 1, 10),
                  ],
                  "x": [1, 1],
              }
          ),
          time_grain="1969-12-29T00:00:00Z/P1W",
          periods=1,
          confidence_interval=0.9,
      )
  
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 1, 17
      )
      assert len(df) == 3
  
      df = prophet(
          df=pd.DataFrame(
              {
                  "__timestamp": [
                      datetime(2022, 1, 8),
                      datetime(2022, 1, 15),
                  ],
                  "x": [1, 1],
              }
          ),
          time_grain="P1W/1970-01-03T00:00:00Z",
          periods=1,
          confidence_interval=0.9,
      )
  
      assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(
          2022, 1, 22
      )
      assert len(df) == 3
  
file_path: superset/tests/unit_tests/pandas_postprocessing/test_prophet.py
imports: from datetime import datetime
  from importlib.util import find_spec
  import pandas
  import pytest
  from superset.exceptions import InvalidPostProcessingError
  from superset.utils.core import DTTM_ALIAS
  from superset.utils.pandas_postprocessing import prophet
  from tests.unit_tests.fixtures.dataframes import prophet_df
label_desc: Use image node_id 1 for calling a global function with example usage: test_prophet_valid() without return types