def METHOD_NAME(self, inputs, model_name_or_path):
    """Test that an error is raised if the number of images and text examples does not match."""
    metric = CLIPScore(model_name_or_path=model_name_or_path)
    with pytest.raises(ValueError, match="Expected the number of images and text examples to be the same.*"):
        metric(torch.randint(255, (2, 3, 64, 64)), "28-year-old chef found dead in San Francisco mall")