code: def test_group_filter_handler():
      s = chart_utils.group_filter_handler(build_col_def("WD"), 1, "I")
      assert s[1] == "date.dt.dayofweek: 1"
      s = chart_utils.group_filter_handler(
          build_col_def("WD"), "NaN", "I"
      )
      assert s[1] == "date: NaN"
      s = chart_utils.group_filter_handler(build_col_def("H2"), 1, "I")
      assert s[1] == "date.dt.hour: 1"
      s = chart_utils.group_filter_handler(
          build_col_def("H"), "20190101", "D"
      )
      assert s[1] == "date.dt.date: 20190101, date.dt.hour: 0"
      s = chart_utils.group_filter_handler(
          build_col_def("D"), "20190101", "D"
      )
      assert s[1] == "date.dt.date: 20190101"
      s = chart_utils.group_filter_handler(
          build_col_def("W"), "20190101", "D"
      )
      assert s[1] == "date.dt.year: 2019, date.dt.week: 1"
      s = chart_utils.group_filter_handler(
          build_col_def("M"), "20191231", "D"
      )
      assert s[1] == "date.dt.year: 2019, date.dt.month: 12"
      s = chart_utils.group_filter_handler(
          build_col_def("Q"), "20191231", "D"
      )
      assert s[1] == "date.dt.year: 2019, date.dt.quarter: 4"
      s = chart_utils.group_filter_handler(
          build_col_def("Y"), "20191231", "D"
      )
      assert s[1] == "date.dt.year: 2019"
      s = chart_utils.group_filter_handler("foo", 1, "I")
      assert s[1] == "foo: 1"
      s = chart_utils.group_filter_handler("foo", "bar", "S")
      assert s[1] == "foo: bar"
      s = chart_utils.group_filter_handler("foo", "NaN", "S")
      assert s[1] == "foo: NaN"
  
file_path: dtale/tests/dtale/test_charts.py
imports: import pandas
  import pytest
  import dtale.charts.utils
  from dtale.constants import CHART_JOINER_CHAR
label_desc: Use image node_id 3 for calling a global function with example usage: test_group_filter_handler() without return types