code: def test_prediction_writer_invalid_write_interval():
      """Test that configuring an unknown interval name raises an error."""
      with pytest.raises(
          MisconfigurationException,
          match=r"`write_interval` should be one of \['batch",
      ):
          DummyPredictionWriter("something")
  
file_path: pytorch-lightning/tests/tests_pytorch/callbacks/test_prediction_writer.py
imports: from unittest.mock import ANY, Mock, call
  import pytest
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import BasePredictionWriter
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 for calling a global function with example usage: test_prediction_writer_invalid_write_interval() without return types