def METHOD_NAME(self, ddp, preds, target, nan_strategy, nan_replace_value):
    """Test class implementation of metric."""
    metric_args = {
        "nan_strategy": nan_strategy,
        "nan_replace_value": nan_replace_value,
        "num_classes": NUM_CLASSES,
    }
    reference_metric = partial(
        _dython_theils_u,
        nan_strategy=nan_strategy,
        nan_replace_value=nan_replace_value,
    )
    self.run_class_metric_test(
        ddp=ddp,
        preds=preds,
        target=target,
        metric_class=TheilsU,
        reference_metric=reference_metric,
        metric_args=metric_args,
    )