class_docstr: Rescales an image observation by some factor. For example, the image size
  can be reduced by a factor of 2.
code: def filter(
      self,
      observation: ObservationType,
      update_internal_state: bool = True,
  ) -> ObservationType:
      observation = observation.astype("uint8")
      rescaled_output_size = tuple(
          [
              int(self.rescale_factor * dim)
              for dim in observation.shape[:2]
          ]
      )
  
      if len(observation.shape) == 3:
          rescaled_output_size += (3,)
  
      # rescale
      observation = resize(
          observation,
          rescaled_output_size,
          anti_aliasing=False,
          preserve_range=True,
      ).astype("uint8")
  
      return observation
  
file_path: coach/rl_coach/filters/observation/observation_rescale_size_by_factor_filter.py
imports: from skimage.transform import resize
  from rl_coach.core_types import ObservationType
  from rl_coach.filters.observation.observation_filter import ObservationFilter
  from rl_coach.spaces import ObservationSpace
label_desc: Use image node_id 3 for calling the ObservationRescaleSizeByFactorFilter obj's underlying member method code with example usage: obj.filter(observation, update_internal_state) and returns: observation