code: def test_memorise(
      self,
      trained_policy: MemoizationPolicy,
      default_domain: Domain,
      stories_path: Text,
  ):
      trackers = train_trackers(
          default_domain, stories_path, augmentation_factor=20
      )
  
      trained_policy.train(trackers, default_domain)
      lookup_with_augmentation = trained_policy.lookup
  
      trackers = [
          t
          for t in trackers
          if not hasattr(t, "is_augmented") or not t.is_augmented
      ]
  
      (
          all_states,
          all_actions,
      ) = trained_policy.featurizer.training_states_and_labels(
          trackers, default_domain
      )
  
      for tracker, states, actions in zip(
          trackers, all_states, all_actions
      ):
          recalled = trained_policy.recall(
              states, tracker, default_domain, None
          )
          assert recalled == actions[0]
  
      nums = np.random.randn(default_domain.num_states)
      random_states = [
          {f: num for f, num in zip(default_domain.input_states, nums)}
      ]
      assert trained_policy._recall_states(random_states) is None
  
      # compare augmentation for augmentation_factor of 0 and 20:
      trackers_no_augmentation = train_trackers(
          default_domain, stories_path, augmentation_factor=0
      )
  
      trained_policy.train(trackers_no_augmentation, default_domain)
      lookup_no_augmentation = trained_policy.lookup
  
      assert lookup_no_augmentation == lookup_with_augmentation
  
imports: import uuid
  from pathlib import Path
  from typing import Type, List, Text, Optional, Dict, Any
  import dataclasses
  import numpy
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from rasa.engine.graph import ExecutionContext, GraphSchema
  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.shared.constants import DEFAULT_SENDER_ID
  from rasa.shared.core.constants import ACTION_LISTEN_NAME, ACTION_UNLIKELY_INTENT_NAME
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import ActionExecuted, Event, UserUttered, EntitiesAdded, SlotSet
  from rasa.core import training
  from rasa.core.constants import POLICY_MAX_HISTORY
  from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer, MaxHistoryTrackerFeaturizer, IntentMaxHistoryTrackerFeaturizer
  from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer, IntentTokenizerSingleStateFeaturizer
  from rasa.core.policies.policy import SupportedData, InvalidPolicyConfig, Policy
  from rasa.core.policies.rule_policy import RulePolicy
  from rasa.core.policies.ted_policy import TEDPolicy
  from rasa.core.policies.memoization import AugmentedMemoizationPolicy, MemoizationPolicy
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.core.generator import TrackerWithCachedStates
  from tests.dialogues import TEST_DEFAULT_DIALOGUE
  from tests.core.utilities import get_tracker, tracker_from_dialogue
label_desc: Use image node_id 4 for calling the TestMemoizationPolicy obj's underlying member method code with example usage: obj.test_memorise(trained_policy, default_domain, stories_path) without return types