code: def state_for_seed(data, seed):
      try:
          seeds_to_states = data.seeds_to_states
      except AttributeError:
          seeds_to_states = {}
          data.seeds_to_states = seeds_to_states
  
      try:
          state = seeds_to_states[seed]
      except KeyError:
          state = RandomState()
          seeds_to_states[seed] = state
  
      return state
  
imports: import inspect
  import math
  from random import Random
  from typing import Any, Dict
  import attr
  from hypothesis.control import should_note
  from hypothesis.internal.reflection import define_function_signature
  from hypothesis.reporting import report
  from hypothesis.strategies._internal.core import binary, lists, permutations, sampled_from
  from hypothesis.strategies._internal.numbers import floats, integers
  from hypothesis.strategies._internal.strategies import SearchStrategy
label_desc: Use image node_id 6 for calling a global function with example usage: state_for_seed(data, seed) and returns: state