code: def create_state_q_function_for_env(env):
      assert isinstance(env.observation_space, gym.spaces.Box)
      ndim_obs = env.observation_space.low.size
      if isinstance(env.action_space, gym.spaces.Discrete):
          return q_functions.FCStateQFunctionWithDiscreteAction(
              ndim_obs=ndim_obs,
              n_actions=env.action_space.n,
              n_hidden_channels=10,
              n_hidden_layers=1,
          )
      elif isinstance(env.action_space, gym.spaces.Box):
          return q_functions.FCQuadraticStateQFunction(
              n_input_channels=ndim_obs,
              n_dim_action=env.action_space.low.size,
              n_hidden_channels=10,
              n_hidden_layers=1,
              action_space=env.action_space,
          )
      else:
          raise NotImplementedError()
  
imports: from chainer import optimizers
  from chainer import testing
  import gym
  import gym.spaces
  import basetest_agents
  from chainerrl import agents
  from chainerrl import explorers
  from chainerrl import policies
  from chainerrl import q_functions
  from chainerrl import replay_buffer
  from chainerrl import v_function
label_desc: Use image node_id 3 for calling a global function with example usage: create_state_q_function_for_env(env) and returns: q_functions, q_functions