code: def test_mixed_groupings(normalize, expected_label, expected_values):
      # Test multiple groupings
      df = DataFrame({"A": [1, 2, 1], "B": [1, 2, 3]})
      gp = df.groupby(
          [[4, 5, 4], "A", lambda i: 7 if i == 1 else 8], as_index=False
      )
      result = gp.value_counts(sort=True, normalize=normalize)
      expected = DataFrame(
          {
              "level_0": np.array([4, 4, 5], dtype=int),
              "A": [1, 1, 2],
              "level_2": [8, 8, 7],
              "B": [1, 3, 2],
              expected_label: expected_values,
          }
      )
      tm.assert_frame_equal(result, expected)
  
imports: import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas import Categorical, CategoricalIndex, DataFrame, Grouper, Index, MultiIndex, Series, date_range, to_datetime
  import pandas._testing
  from pandas.util.version import Version
label_desc: Use image node_id 25 for calling a global function with example usage: test_mixed_groupings(normalize, expected_label, expected_values) without return types