code: def test_function_method_arg_rejected():
      def bad_fn(y_p, y_t, method):
          print(method)
          return skm.accuracy_score(y_p, y_t)
  
      expected = (
          "Callables which accept a 'method' argument"
          " may not be passed to make_derived_metric()."
          " Please use functools.partial()"
      )
      with pytest.raises(ValueError) as context:
          _ = metrics.make_derived_metric(
              metric=bad_fn, transform="group_max"
          )
      assert context.value.args[0] == expected
  
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 14 for calling a global function with example usage: test_function_method_arg_rejected() and returns: skm