code: def test_add_category_cols():
      coef_summary = pd.DataFrame(
          {
              "Pred_col": [
                  "Intercept",
                  "ct1",
                  "sin1_toy_yearly",
                  "y_lag7",
                  "ct1:sin1_toy_yearly",
                  "C(Q('events_Chinese New Year'), levels=['', 'event'])[T.event]",
                  "x",
              ]
          }
      )
      pred_category = {
          "intercept": ["Intercept"],
          "time_features": ["ct1", "ct1:sin1_toy_yearly"],
          "event_features": [
              "C(Q('events_Chinese New Year'), levels=['', 'event'])[T.event]"
          ],
          "trend_features": ["ct1", "ct1:sin1_toy_yearly"],
          "seasonality_features": [
              "sin1_toy_yearly",
              "ct1:sin1_toy_yearly",
          ],
          "lag_features": ["y_lag7"],
          "regressor_features": ["x"],
          "interaction_features": ["ct1:sin1_toy_yearly"],
      }
      new_df = add_category_cols(coef_summary, pred_category)
      pd.testing.assert_frame_equal(
          new_df,
          pd.DataFrame(
              {
                  "Pred_col": [
                      "Intercept",
                      "ct1",
                      "sin1_toy_yearly",
                      "y_lag7",
                      "ct1:sin1_toy_yearly",
                      "C(Q('events_Chinese New Year'), levels=['', 'event'])[T.event]",
                      "x",
                  ],
                  "is_intercept": [1, 0, 0, 0, 0, 0, 0],
                  "is_time_feature": [0, 1, 0, 0, 1, 0, 0],
                  "is_event": [0, 0, 0, 0, 0, 1, 0],
                  "is_trend": [0, 1, 0, 0, 1, 0, 0],
                  "is_seasonality": [0, 0, 1, 0, 1, 0, 0],
                  "is_lag": [0, 0, 0, 1, 0, 0, 0],
                  "is_regressor": [0, 0, 0, 0, 0, 0, 1],
                  "is_interaction": [0, 0, 0, 0, 1, 0, 0],
              }
          ),
      )
  
file_path: greykite/greykite/tests/algo/common/test_col_name_utils.py
imports: import pandas
  from greykite.algo.common.col_name_utils import add_category_cols
  from greykite.algo.common.col_name_utils import create_pred_category
  from greykite.algo.common.col_name_utils import filter_coef_summary
  from greykite.algo.common.col_name_utils import simplify_changepoints
  from greykite.algo.common.col_name_utils import simplify_event
  from greykite.algo.common.col_name_utils import simplify_name
  from greykite.algo.common.col_name_utils import simplify_pred_cols
  from greykite.algo.common.col_name_utils import simplify_time_features
label_desc: Use image node_id 6 for calling a global function with example usage: test_add_category_cols() without return types