code: def test_log_invalid_raises(tmpdir, value):
      class TestModel(BoringModel):
          def training_step(self, *args):
              self.log("foo", value)
  
      trainer = Trainer(default_root_dir=tmpdir, fast_dev_run=1)
      model = TestModel()
      match = escape(f"self.log(foo, {value})` was called")
      with pytest.raises(ValueError, match=match):
          trainer.fit(model)
  
imports: import collections
  import itertools
  from re import escape
  from unittest import mock
  from unittest.mock import call
  import numpy
  import pytest
  import torch
  from lightning.pytorch import Trainer, callbacks
  from lightning.pytorch.callbacks import EarlyStopping, ModelCheckpoint, TQDMProgressBar
  from lightning.pytorch.core.module import LightningModule
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset, RandomDictDataset
  from lightning.pytorch.loggers.tensorboard import TensorBoardLogger
  from lightning.pytorch.trainer.states import RunningStage
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.imports import _TORCHMETRICS_GREATER_EQUAL_0_11
  from lightning_utilities.test.warning import no_warning_call
  from torch import Tensor
  from torch.utils.data import DataLoader
  from torchmetrics import Accuracy
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 11 for calling a global function with example usage: test_log_invalid_raises(tmpdir, value) without return types