code: def _sample_checker(
      old_samples, new_samples, op: operator, threshold: int
  ):
      found_one = False
      for os in old_samples:
          cond = op(os, new_samples)
          if cond.sum() > threshold:
              found_one = True
              break
      return found_one
  
file_path: torchmetrics/tests/unittests/wrappers/test_bootstrapping.py
imports: import operator
  from functools import partial
  from typing import Any
  import numpy
  import pytest
  import torch
  from lightning_utilities import apply_to_collection
  from sklearn.metrics import mean_squared_error, precision_score, recall_score
  from torch import Tensor
  from torchmetrics.classification import MulticlassF1Score, MulticlassPrecision, MulticlassRecall
  from torchmetrics.regression import MeanSquaredError
  from torchmetrics.wrappers.bootstrapping import BootStrapper, _bootstrap_sampler
  from unittests.helpers import seed_all
label_desc: Use image node_id 1 for calling a global function with example usage: _sample_checker(old_samples, new_samples, op, threshold) and returns: found_one