class_docstr: Test class for `MultilabelRanking` metric.
class_docstr_tok: ["Test","class","for","`","MultilabelRanking","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_multilabel_ranking(
      self,
      inputs,
      metric,
      functional_metric,
      ref_metric,
      ddp,
      ignore_index,
  ):
      """Test class implementation of metric."""
      preds, target = inputs
      if ignore_index is not None:
          target = inject_ignore_index(target, ignore_index)
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=metric,
          reference_metric=partial(
              _sklearn_ranking, fn=ref_metric, ignore_index=ignore_index
          ),
          metric_args={
              "num_labels": NUM_CLASSES,
              "ignore_index": ignore_index,
          },
      )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import coverage_error
  from sklearn.metrics import label_ranking_average_precision_score
  from sklearn.metrics import label_ranking_loss
  from torchmetrics.classification.ranking import MultilabelCoverageError, MultilabelRankingAveragePrecision, MultilabelRankingLoss
  from torchmetrics.functional.classification.ranking import multilabel_coverage_error, multilabel_ranking_average_precision, multilabel_ranking_loss
  from unittests import NUM_CLASSES
  from unittests.classification.inputs import _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index
label_desc: Use image node_id 1 for calling the TestMultilabelRanking obj's underlying member method code with example usage: obj.test_multilabel_ranking(inputs, metric, functional_metric, ref_metric, ddp, ignore_index) without return types