code: def test_graph_trainer_train_logging(
      tmp_path: Path,
      temp_cache: TrainingCache,
      train_with_schema: Callable,
      caplog: LogCaptureFixture,
  ):
      input_file = tmp_path / "input_file.txt"
      input_file.write_text("3")
  
      train_schema = GraphSchema(
          {
              "input": SchemaNode(
                  needs={},
                  uses=ProvideX,
                  fn="provide",
                  constructor_name="create",
                  config={},
              ),
              "subtract 2": SchemaNode(
                  needs={},
                  uses=ProvideX,
                  fn="provide",
                  constructor_name="create",
                  config={},
                  is_target=True,
                  is_input=True,
              ),
              "subtract": SchemaNode(
                  needs={"i": "input"},
                  uses=SubtractByX,
                  fn="subtract_x",
                  constructor_name="create",
                  config={"x": 1},
                  is_target=True,
                  is_input=False,
              ),
          }
      )
  
      with caplog.at_level(
          logging.INFO, logger="rasa.engine.training.hooks"
      ):
          train_with_schema(train_schema, temp_cache)
  
      caplog_info_records = list(
          filter(lambda x: x[1] == logging.INFO, caplog.record_tuples)
      )
  
      caplog_messages = list(
          [record[2] for record in caplog_info_records]
      )
  
      assert caplog_messages == [
          "Starting to train component 'SubtractByX'.",
          "Finished training component 'SubtractByX'.",
      ]
  
imports: import logging
  from pathlib import Path
  from typing import Callable, Dict, Optional, Text, Type, Any
  from unittest.mock import Mock
  from _pytest.logging import LogCaptureFixture
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.tmpdir import TempPathFactory
  import pytest
  from rasa.engine.caching import LocalTrainingCache, TrainingCache
  from rasa.engine.exceptions import GraphComponentException
  from rasa.engine.graph import GraphComponent, GraphSchema, SchemaNode, GraphModelConfiguration, GraphNode, ExecutionContext, GraphNodeHook
  from rasa.engine.runner.dask import DaskGraphRunner
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.training.graph_trainer import GraphTrainer
  from rasa.shared.core.domain import Domain
  from rasa.shared.data import TrainingType
  from rasa.shared.importers.importer import TrainingDataImporter
  from tests.engine.graph_components_test_classes import AddInputs, AssertComponent, FileReader, PersistableTestComponent, ProvideX, SubtractByX, CacheableComponent
label_desc: Use image node_id 9 for calling a global function with example usage: test_graph_trainer_train_logging(tmp_path, temp_cache, train_with_schema, caplog) without return types