class_docstr: Tests for the new `registry` and `registry_mapping` of the transform algo wrapper.
docstr: Test the case where the wrapper observes a trial that hasn't been suggested by the
  wrapped algorithm.
docstr_tok: ["Test","the","case","where","the","wrapper","observes","a","trial","that","has","n't","been","suggested","by","the","wrapped","algorithm","."]
code: def test_observe_trial_not_suggested(
      self, algo_wrapper: SpaceTransform[FixedSuggestionAlgo]
  ):
      """Test the case where the wrapper observes a trial that hasn't been suggested by the
      wrapped algorithm.
      """
      original_space = algo_wrapper.space
      transformed_space = algo_wrapper.transformed_space
      algo = algo_wrapper.algorithm
  
      trial = original_space.sample()[0]
      trial_with_results = copy.deepcopy(trial)
      trial_with_results.status = "completed"
      trial_with_results._results = [
          Trial.Result(name="objective", type="objective", value=1)
      ]
      transformed_trial_with_results = transformed_space.transform(
          trial_with_results
      )
  
      algo_wrapper.observe([trial_with_results])
  
      assert algo_wrapper.has_observed(trial_with_results)
      assert algo_wrapper.algorithm.has_observed(
          transformed_trial_with_results
      )
  
      assert algo_wrapper.has_suggested(trial_with_results)
      assert algo_wrapper.algorithm.has_suggested(
          transformed_trial_with_results
      )
  
imports: from __future__ import annotations
  import copy
  import typing
  from typing import Any, ClassVar
  import numpy
  import pytest
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Space
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import backward, format_trials
  from orion.core.worker.algo_wrappers.space_transform import SpaceTransform
  from orion.core.worker.transformer import build_required_space
  from orion.core.worker.trial import Trial
  from orion.testing.dummy_algo import FixedSuggestionAlgo
  from .base import AlgoWrapperTests
label_desc: Use image node_id 4 for calling the TestRegistration obj's underlying member method code with example usage: obj.test_observe_trial_not_suggested(algo_wrapper) without return types