code: def test_groupby_agg_null_columns(df):
      """
      Test that aggregation on null column retains the null entries and returns
      the right aggregated value.
      """
      expected = df.copy()
      expected["num_count"] = expected.groupby(["nulls"], dropna=False)[
          "type"
      ].transform("size")
      assert_frame_equal(
          df.groupby_agg(
              by="nulls",
              new_column_name="num_count",
              agg_column_name="num",
              agg="size",
              dropna=False,
          ),
          expected,
      )
  
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 5 for calling a global function with example usage: test_groupby_agg_null_columns(df) without return types