code: def test_patsy_categorical_term():
      """Tests patsy_categorical_term"""
      term = patsy_categorical_term(
          "term", levels=None, coding=None, quote=False
      )
      assert term == "C(term)"
  
      term = patsy_categorical_term(
          "term", levels=None, coding=None, quote=True
      )
      assert term == "C(Q('term'))"
  
      term = patsy_categorical_term(
          "term", levels=None, coding="Sum", quote=True
      )
      assert term == "C(Q('term'), Sum)"
  
      term = patsy_categorical_term(
          "term", levels=["level1", "level2"], coding="Sum", quote=True
      )
      assert term == "C(Q('term'), Sum, levels=['level1', 'level2'])"
  
      term = patsy_categorical_term(
          "term", levels=["level1", "level2"], coding="Sum", quote=False
      )
      assert term == "C(term, Sum, levels=['level1', 'level2'])"
  
imports: import datetime
  import pandas
  import pytest
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import cols_interact
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import dedup_holiday_dict
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import get_event_pred_cols
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import patsy_categorical_term
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import split_events_into_dictionaries
  from greykite.common.constants import EVENT_DEFAULT
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.constants import EVENT_INDICATOR
  from greykite.common.features.timeseries_features import get_holidays
label_desc: Use image node_id 7 for calling a global function with example usage: test_patsy_categorical_term() without return types