code: def test_derived_difference_between_groups():
      my_fn = metrics.make_derived_metric(
          metric=skm.accuracy_score,
          transform="difference",
          sample_param_names=["sample_weight"],
      )
  
      grouped = metrics.MetricFrame(
          metrics=skm.accuracy_score,
          y_true=y_t,
          y_pred=y_p,
          sensitive_features=gid,
      )
  
      actual = my_fn(
          y_t, y_p, sensitive_features=gid, method="between_groups"
      )
      assert actual == grouped.difference(method="between_groups")
  
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 1 for calling a global function with example usage: test_derived_difference_between_groups() without return types