def METHOD_NAME(self, instance: NegativeSampler) -> None:
    """Test generating a negative sample."""
    # Generate negative sample
    negative_batch, batch_filter = instance.sample(positive_batch=self.positive_batch)
    # check filter shape if necessary
    if instance.filterer is not None:
        assert batch_filter is not None
        assert batch_filter.shape == (self.batch_size, instance.num_negs_per_pos)
        assert batch_filter.dtype == torch.bool
    else:
        assert batch_filter is None
    # check shape
    assert negative_batch.shape == (self.positive_batch.shape[0], instance.num_negs_per_pos, 3)
    # check bounds: heads
    assert _array_check_bounds(negative_batch[..., 0], low=0, high=self.triples_factory.num_entities)
    # check bounds: relations
    assert _array_check_bounds(negative_batch[..., 1], low=0, high=self.triples_factory.num_relations)
    # check bounds: tails
    assert _array_check_bounds(negative_batch[..., 2], low=0, high=self.triples_factory.num_entities)
    if instance.filterer is not None:
        positive_batch = self.positive_batch.unsqueeze(dim=1).repeat(1, instance.num_negs_per_pos, 1)
        positive_batch = positive_batch[batch_filter]
        negative_batch = negative_batch[batch_filter]
        # test that the negative triple is not the original positive triple
        assert (negative_batch != positive_batch).any(dim=-1).all()