def METHOD_NAME(
    self,
    reduction: str,
    tracin_constructor: Callable,
    unpack_inputs: bool,
    proponents: bool,
    batch_size: int,
    k: int,
    use_gpu: bool,
) -> None:
    """
    This test constructs a random BasicLinearNet, and checks that the proponents
    obtained by calling `influence` and sorting are equal to the proponents
    obtained by calling `_k_most_influential`.  Those calls are made through
    the calls to wrapper method `influence`.
    """
    with tempfile.TemporaryDirectory() as tmpdir:
        (
            net,
            train_dataset,
            test_samples,
            test_labels,
        ) = get_random_model_and_data(
            tmpdir,
            unpack_inputs,
            True,
            use_gpu,
        )
        self.assertTrue(isinstance(reduction, str))
        self.assertTrue(callable(tracin_constructor))
        criterion = nn.MSELoss(reduction=reduction)
        tracin = tracin_constructor(
            net,
            train_dataset,
            tmpdir,
            batch_size,
            criterion,
        )
        train_scores = tracin.influence(
            _format_batch_into_tuple(test_samples, test_labels, unpack_inputs),
            k=None,
        )
        sort_idx = torch.argsort(train_scores, dim=1, descending=proponents)[:, 0:k]
        idx, _train_scores = tracin.influence(
            _format_batch_into_tuple(test_samples, test_labels, unpack_inputs),
            k=k,
            proponents=proponents,
        )
        for i in range(len(idx)):
            # check that idx[i] is correct
            assertTensorAlmostEqual(
                self,
                train_scores[i, idx[i]],
                train_scores[i, sort_idx[i]],
                delta=0.0,
                mode="max",
            )
            # check that _train_scores[i] is correct
            assertTensorAlmostEqual(
                self,
                _train_scores[i],
                train_scores[i, sort_idx[i]],
                delta=0.001,
                mode="max",
            )