code: def test_tensorboard_log_graph(tmp_path, example_input_array):
      """Test that log graph works with both model.example_input_array and if array is passed externally."""
      model = BoringModel()
      if example_input_array is not None:
          model.example_input_array = None
  
      logger = TensorBoardLogger(tmp_path, log_graph=True)
      logger.log_graph(model, example_input_array)
  
imports: import logging
  import os
  from argparse import Namespace
  from unittest import mock
  from unittest.mock import Mock
  import numpy
  import pytest
  import torch
  import yaml
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import TensorBoardLogger
  from lightning.pytorch.loggers.tensorboard import _TENSORBOARD_AVAILABLE
  from lightning.pytorch.utilities.imports import _OMEGACONF_AVAILABLE
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 11 for calling a global function with example usage: test_tensorboard_log_graph(tmp_path, example_input_array) without return types