docstr: Verify that resetting state makes sampling deterministic
code: def test_state_dict(self, seed: int):
      """Verify that resetting state makes sampling deterministic"""
      algo = self.create_algo(seed=seed)
  
      state = algo.state_dict
      a = algo.suggest(1)[0]
  
      # NOTE: This is not necessarily true for all algorithms. For instance, if the algo doesn't
      # have any RNG (e.g. GridSearch), this will fail.
      new_algo = self.create_algo()
      new_state = new_algo.state_dict
      b = new_algo.suggest(1)[0]
      if _are_equal(new_state, state):
          # If the state is the same, the trials should be the same.
          assert a == b
      else:
          # If the state is different, the trials should be different.
          assert a != b
  
      new_algo.set_state(state)
      c = new_algo.suggest(1)[0]
      # TODO: For EvolutionES, the params are identical, but the ids are different.
      assert a.params == c.params
  
imports: from __future__ import annotations
  import copy
  from typing import ClassVar
  import numpy
  import pytest
  from test_hyperband import create_rung_from_points, create_trial_for_hb
  from orion.algo.evolution_es import BracketEVES, BudgetTuple, EvolutionES, compute_budgets
  from orion.algo.hyperband import RungDict
  from orion.algo.space import Fidelity, Real, Space
  from orion.core.utils import backward
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase, _are_equal
  from orion.testing.trial import create_trial
label_desc: Use image node_id 7 for calling the TestGenericEvolutionES obj's underlying member method code with example usage: obj.test_state_dict(seed) without return types