code: def test_pearsons_warning_on_small_input(dtype, scale):
      """Check that a user warning is raised for small input."""
      preds = scale * torch.randn(100, dtype=dtype)
      target = scale * torch.randn(100, dtype=dtype)
      with pytest.warns(
          UserWarning,
          match="The variance of predictions or target is close to zero.*",
      ):
          pearson_corrcoef(preds, target)
  
imports: from functools import partial
  import pytest
  import torch
  from scipy.stats import pearsonr
  from torchmetrics.functional.regression.pearson import pearson_corrcoef
  from torchmetrics.regression.pearson import PearsonCorrCoef, _final_aggregation
  from unittests import BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 5 for calling a global function with example usage: test_pearsons_warning_on_small_input(dtype, scale) without return types