code: def test_groupby_agg_multi():
      df = pd.DataFrame(
          {
              "date": [
                  "20190101",
                  "20190101",
                  "20190102",
                  "20190102",
                  "20190304",
                  "20190304",
              ],
              "user_id": [1, 2, 1, 2, 1, 2],
              "values": [1, 2, 3, 4, 5, 6],
          }
      )
  
      df_new = df.groupby_agg(
          by=["date", "user_id"],
          new_column_name="date_average",
          agg_column_name="values",
          agg=np.count_nonzero,
      )
  
      expected_agg = np.array([1, 1, 1, 1, 1, 1])
  
      np.testing.assert_equal(df_new["date_average"], expected_agg)
  
file_path: pyjanitor/tests/functions/test_groupby_agg.py
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_groupby_agg_multi() without return types