code: def test_user_defined_metric(self):
      def custom(x, y, sample_weight=None):
          return np.sum(x + y)
  
      UserDefinedEvalMetric().set_metric(custom)
  
      params = {"name": "user_defined_metric"}
      m = Metric(params)
  
      a = np.array([1, 1, 1])
  
      score = m(a, a)
      self.assertEqual(score, 6)
  
file_path: mljar-supervised/tests/tests_utils/test_metric.py
imports: import unittest
  import numpy
  import pandas
  from numpy.testing import assert_almost_equal
  from supervised.utils.metric import Metric
  from supervised.utils.metric import UserDefinedEvalMetric
label_desc: Use image node_id 6 for calling the MetricTest obj's underlying member method code with example usage: obj.test_user_defined_metric() and returns: np