code: def serving_obs_preprocessor(
      self, obs: np.ndarray
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      obs_space = self.observation_space
      if not isinstance(obs_space, spaces.Box):
          raise NotImplementedError(f"{obs_space} not supported!")
  
      if len(obs_space.shape) != 1:
          raise NotImplementedError(
              f"Box shape {obs_space.shape} not supported!"
          )
      state_dim = obs_space.shape[0]
      obs_tensor = torch.tensor(obs).float().view(1, state_dim)
      presence_tensor = torch.ones_like(obs_tensor)
      return (obs_tensor, presence_tensor)
  
file_path: ReAgent/reagent/gym/envs/gym.py
imports: import logging
  from typing import Optional, Tuple
  import gym
  import numpy
  import reagent.core.types
  import torch
  from gym import spaces
  from gym_minigrid.wrappers import ReseedWrapper
  from reagent.core.dataclasses import dataclass
  from reagent.gym.envs.env_wrapper import EnvWrapper
  from reagent.gym.envs.wrappers.simple_minigrid import SimpleObsWrapper
label_desc: Use image node_id 3 for calling the Gym obj's underlying member method code with example usage: obj.serving_obs_preprocessor(obs) and returns: obs_tensor,  presence_tensor