def METHOD_NAME(preds, target):
    preds = preds.argmax(1) if preds.ndim == 2 else preds
    target = target.argmax(1) if target.ndim == 2 else target
    preds, target = preds.numpy().astype(int), target.numpy().astype(int)
    observed_values = pd.crosstab(preds, target)
    t = association(observed=observed_values, method="pearson")
    return torch.tensor(t)