code: def test_pearsons_contingency_coefficient_matrix(
      pearson_matrix_input,
  ):
      """Test matrix version of metric works as expected."""
      tm_score = pearsons_contingency_coefficient_matrix(
          pearson_matrix_input
      )
      reference_score = _pd_pearsons_t_matrix(pearson_matrix_input)
      assert torch.allclose(tm_score, reference_score)
  
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 4 for calling a global function with example usage: test_pearsons_contingency_coefficient_matrix(pearson_matrix_input) without return types