code: def test_no_tensorboardX_nor_torch_utils_tensorboard():
      with patch.dict(
          "sys.modules",
          {"tensorboardX": None, "torch.utils.tensorboard": None},
      ):
          with pytest.raises(
              ModuleNotFoundError,
              match=r"This contrib module requires either tensorboardX or torch",
          ):
              TensorboardLogger(log_dir=None)
  
imports: import math
  import os
  from unittest.mock import ANY, call, MagicMock, patch
  import pytest
  import torch
  from ignite.contrib.handlers.tensorboard_logger import global_step_from_engine, GradsHistHandler, GradsScalarHandler, OptimizerParamsHandler, OutputHandler, TensorboardLogger, WeightsHistHandler, WeightsScalarHandler
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 27 for calling a global function with example usage: test_no_tensorboardX_nor_torch_utils_tensorboard() without return types