code: def test_mase(self):
      insample = self.series_train
      test_cases, _ = self.get_test_cases()
      for s1, s2 in test_cases:
          # multivariate, series as args
          assert (
              round(
                  abs(
                      metrics.mase(
                          s1.stack(s1),
                          s2.stack(s2),
                          insample.stack(insample),
                          reduction=(lambda x: x[0]),
                      )
                      - metrics.mase(s1, s2, insample)
                  ),
                  7,
              )
              == 0
          )
          # multi-ts, series as kwargs
          assert (
              round(
                  abs(
                      metrics.mase(
                          actual_series=[s1] * 2,
                          pred_series=[s2] * 2,
                          insample=[insample] * 2,
                          reduction=(lambda x: x[0]),
                          inter_reduction=(lambda x: x[0]),
                      )
                      - metrics.mase(s1, s2, insample)
                  ),
                  7,
              )
              == 0
          )
          # checking with n_jobs and verbose
          assert (
              round(
                  abs(
                      metrics.mase(
                          [s1] * 5,
                          pred_series=[s2] * 5,
                          insample=[insample] * 5,
                          reduction=(lambda x: x[0]),
                          inter_reduction=(lambda x: x[0]),
                      )
                      - metrics.mase(
                          [s1] * 5,
                          [s2] * 5,
                          insample=[insample] * 5,
                          reduction=(lambda x: x[0]),
                          inter_reduction=(lambda x: x[0]),
                          n_jobs=-1,
                          verbose=True,
                      )
                  ),
                  7,
              )
              == 0
          )
      # checking with m=None
      assert (
          round(
              abs(
                  metrics.mase(
                      self.series2,
                      self.series2,
                      self.series_train_not_periodic,
                      m=None,
                  )
                  - metrics.mase(
                      [self.series2] * 2,
                      [self.series2] * 2,
                      [self.series_train_not_periodic] * 2,
                      m=None,
                      inter_reduction=np.mean,
                  )
              ),
              7,
          )
          == 0
      )
  
      # fails because of wrong indexes (series1/2 indexes should be the continuation of series3)
      with pytest.raises(ValueError):
          metrics.mase(self.series1, self.series2, self.series3, 1)
      # multi-ts, second series is not a TimeSeries
      with pytest.raises(ValueError):
          metrics.mase([self.series1] * 2, self.series2, [insample] * 2)
      # multi-ts, insample series is not a TimeSeries
      with pytest.raises(ValueError):
          metrics.mase([self.series1] * 2, [self.series2] * 2, insample)
      # multi-ts one array has different length
      with pytest.raises(ValueError):
          metrics.mase(
              [self.series1] * 2, [self.series2] * 2, [insample] * 3
          )
      # not supported input
      with pytest.raises(ValueError):
          metrics.mase(1, 2, 3)
  
imports: import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.metrics import metrics
label_desc: Use image node_id 18 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_mase() without return types