code: def test_cramers_v_matrix(
      cramers_matrix_input,
      bias_correction,
      nan_strategy,
      nan_replace_value,
  ):
      """Test matrix version of metric works as expected."""
      tm_score = cramers_v_matrix(
          cramers_matrix_input,
          bias_correction,
          nan_strategy,
          nan_replace_value,
      )
      reference_score = _dython_cramers_v_matrix(
          cramers_matrix_input,
          bias_correction,
          nan_strategy,
          nan_replace_value,
      )
      assert torch.allclose(tm_score, reference_score)
  
file_path: torchmetrics/tests/unittests/nominal/test_cramers.py
imports: import itertools
  import operator
  from functools import partial
  import pytest
  import torch
  from dython.nominal import cramers_v
  from lightning_utilities.core.imports import compare_version
  from torchmetrics.functional.nominal.cramers import cramers_v, cramers_v_matrix
  from torchmetrics.nominal.cramers import CramersV
  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_cramers_v_matrix(cramers_matrix_input, bias_correction, nan_strategy, nan_replace_value) without return types