code: def test_group_max():
      my_fn = metrics.make_derived_metric(
          metric=skm.precision_score,
          transform="group_max",
          sample_param_names=["sample_weight"],
      )
  
      grouped = metrics.MetricFrame(
          metrics=skm.precision_score,
          y_true=y_t,
          y_pred=y_p,
          sensitive_features=gid,
      )
      actual = my_fn(y_t, y_p, sensitive_features=gid)
      assert actual == grouped.group_max()
  
file_path: fairlearn/test/unit/metrics/test_make_derived_metric.py
imports: import functools
  import numpy
  import pytest
  import sklearn.metrics
  import fairlearn.metrics
label_desc: Use image node_id 12 for calling a global function with example usage: test_group_max() without return types