code: def build_state_normalizer(env: EnvWrapper):
      if isinstance(env.observation_space, spaces.Box):
          assert (
              len(env.observation_space.shape) == 1
          ), f"{env.observation_space.shape} has dim > 1, and is not supported."
          return only_continuous_normalizer(
              list(range(env.observation_space.shape[0])),
              env.observation_space.low,
              env.observation_space.high,
          )
      elif isinstance(env.observation_space, spaces.Dict):
          # assuming env.observation_space is image
          return None
      else:
          raise NotImplementedError(
              f"{env.observation_space} not supported"
          )
  
imports: import logging
  import random
  from typing import Dict, List, Optional
  import gym
  import numpy
  import pandas
  import torch
  import torch.nn.functional
  from gym import spaces
  from reagent.core.parameters import NormalizationData, NormalizationKey, ProblemDomain
  from reagent.gym.agents.agent import Agent
  from reagent.gym.agents.post_step import add_replay_buffer_post_step
  from reagent.gym.envs import EnvWrapper
  from reagent.gym.normalizers import discrete_action_normalizer, only_continuous_action_normalizer, only_continuous_normalizer
  from reagent.gym.policies.random_policies import make_random_policy_for_env
  from reagent.gym.runners.gymrunner import run_episode
  from reagent.replay_memory import ReplayBuffer
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: build_state_normalizer(env) and returns: only_continuous_normalizer, None