code: def test_resources_fingerprints_are_unique_when_cached(
      temp_cache: LocalTrainingCache, train_with_schema: Callable
  ):
      train_schema = GraphSchema(
          {
              "train": SchemaNode(
                  needs={},
                  uses=PersistableTestComponent,
                  fn="train",
                  constructor_name="create",
                  config={"test_value": "4"},
                  is_target=True,
              ),
              "process": SchemaNode(
                  needs={"resource": "train"},
                  uses=PersistableTestComponent,
                  fn="run_inference",
                  constructor_name="load",
                  config={},
              ),
              "assert_node": SchemaNode(
                  needs={"i": "process"},
                  uses=AssertComponent,
                  fn="run_assert",
                  constructor_name="create",
                  config={"value_to_assert": "4"},
                  is_target=True,
              ),
          }
      )
  
      # Train to cache
      train_with_schema(train_schema, temp_cache)
  
      train_schema.nodes["train"].config["test_value"] = "5"
      train_schema.nodes["assert_node"].config["value_to_assert"] = "5"
      train_with_schema(train_schema, temp_cache)
  
      # Add something to the config so only "assert_node" re-runs.
      train_schema.nodes["assert_node"].config[
          "something"
      ] = "something"
      # This breaks when `Resource`s use the node name as a fingerprint.
      # This is because the `Resource` for the first run is retrieved from the cache which
      # returns 4 whereas it should be the second resource which returns 5, and the schema
      # assert_node expects 5 now.
      train_with_schema(train_schema, temp_cache)
  
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 11 for calling a global function with example usage: test_resources_fingerprints_are_unique_when_cached(temp_cache, train_with_schema) without return types