code: def pearson_matrix_input():
      """Define input in matrix format for the metric."""
      return torch.cat(
          [
              torch.randint(
                  high=NUM_CLASSES,
                  size=(NUM_BATCHES * BATCH_SIZE, 1),
                  dtype=torch.float,
              ),
              torch.randint(
                  high=NUM_CLASSES + 2,
                  size=(NUM_BATCHES * BATCH_SIZE, 1),
                  dtype=torch.float,
              ),
              torch.randint(
                  high=2,
                  size=(NUM_BATCHES * BATCH_SIZE, 1),
                  dtype=torch.float,
              ),
          ],
          dim=-1,
      )
  
file_path: torchmetrics/tests/unittests/nominal/test_pearson.py
imports: import itertools
  import operator
  import pandas
  import pytest
  import torch
  from lightning_utilities.core.imports import compare_version
  from scipy.stats.contingency import association
  from torchmetrics.functional.nominal.pearson import pearsons_contingency_coefficient, pearsons_contingency_coefficient_matrix
  from torchmetrics.nominal.pearson import PearsonsContingencyCoefficient
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling a global function with example usage: pearson_matrix_input() and returns: torch