code: def test_get_regressor_cols():
      """Tests get_regressor_names"""
      # `add_regressor_dict` is a list of dict
      template = ProphetTemplate()
      model_components = ModelComponentsParam(
          regressors={
              "add_regressor_dict": [
                  {
                      "regressor1": {
                          "prior_scale": 10,
                          "standardize": True,
                          "mode": "additive",
                      },
                      "regressor2": {
                          "prior_scale": 15,
                          "standardize": False,
                          "mode": "additive",
                      },
                      "regressor3": {},
                  },
                  None,
                  {
                      "regressor1": {
                          "prior_scale": 10,
                          "standardize": True,
                          "mode": "additive",
                      },
                      "regressor4": {
                          "prior_scale": 15,
                          "standardize": False,
                          "mode": "additive",
                      },
                      "regressor5": {},
                  },
              ]
          }
      )
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert set(template.get_regressor_cols()) == {
          "regressor1",
          "regressor2",
          "regressor3",
          "regressor4",
          "regressor5",
      }
  
      # `add_regressor_dict` is a single dict
      model_components = ModelComponentsParam(
          regressors={
              "add_regressor_dict": {
                  "regressor1": {
                      "prior_scale": 10,
                      "standardize": True,
                      "mode": "additive",
                  },
                  "regressor2": {
                      "prior_scale": 15,
                      "standardize": False,
                      "mode": "additive",
                  },
                  "regressor3": {},
              }
          }
      )
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert set(template.get_regressor_cols()) == {
          "regressor1",
          "regressor2",
          "regressor3",
      }
  
      # no regressors
      model_components = ModelComponentsParam()
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert template.get_regressor_cols() is None
  
      model_components = ModelComponentsParam(regressors={})
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert template.get_regressor_cols() is None
  
      model_components = ModelComponentsParam(
          regressors={"add_regressor_dict": []}
      )
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert template.get_regressor_cols() is None
  
      model_components = ModelComponentsParam(
          regressors={"add_regressor_dict": [{}, None]}
      )
      template.config = ForecastConfig(
          model_components_param=model_components
      )
      assert template.get_regressor_cols() is None
  
imports: import datetime
  import sys
  import warnings
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  import greykite.common.constants
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.constants import COMPUTATION_N_JOBS
  from greykite.framework.constants import CV_REPORT_METRICS_ALL
  from greykite.framework.templates.autogen.forecast_config import ComputationParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationMetricParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.templates.prophet_template import ProphetTemplate
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_regressor_cols() without return types