code: def test_sample_weight(self):
      metrics = [
          "logloss",
          "auc",
          "acc",
          "rmse",
          "mse",
          "mae",
          "r2",
          "mape",
      ]
      for m in metrics:
          metric = Metric({"name": m})
          y_true = np.array([0, 0, 1, 1])
          y_predicted = np.array([0, 0, 0, 1])
          sample_weight = np.array([1, 1, 1, 1])
  
          score_1 = metric(y_true, y_predicted)
          score_2 = metric(y_true, y_predicted, sample_weight)
          assert_almost_equal(score_1, score_2)
  
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 3 for calling the MetricTest obj's underlying member method code with example usage: obj.test_sample_weight() without return types