code: def continuous_planning(self, state: rlt.FeatureData) -> torch.Tensor:
      # TODO: Warmstarts means and vars using previous solutions (T48841404)
      mean = (self.action_upper_bounds + self.action_lower_bounds) / 2
      var = (
          self.action_upper_bounds - self.action_lower_bounds
      ) ** 2 / 16
      normal_sampler = stats.truncnorm(
          -2, 2, loc=np.zeros_like(mean), scale=np.ones_like(mean)
      )
  
      for i in range(self.cem_num_iterations):
          logger.debug(f"{i}-th cem iteration.")
          const_var = self.constrained_variance(mean, var)
          solutions = (
              normal_sampler.rvs(
                  size=[
                      self.cem_pop_size,
                      self.action_dim * self.plan_horizon_length,
                  ]
              )
              * np.sqrt(const_var)
              + mean
          )
          action_solutions = torch.from_numpy(
              solutions.reshape(
                  (
                      self.cem_pop_size,
                      self.plan_horizon_length,
                      self.action_dim,
                  )
              )
          ).float()
          acc_rewards = self.acc_rewards_of_all_solutions(
              state, action_solutions
          )
          elites = solutions[np.argsort(acc_rewards)][
              -self.num_elites :
          ]
          new_mean = np.mean(elites, axis=0)
          new_var = np.var(elites, axis=0)
          mean = self.alpha * mean + (1 - self.alpha) * new_mean
          var = self.alpha * var + (1 - self.alpha) * new_var
  
          if np.max(var) <= self.epsilon:
              break
  
      # Pick the first action of the optimal solution
      solution = mean[: self.action_dim]
      raw_action = solution.reshape(-1)
      low = torch.tensor(CONTINUOUS_TRAINING_ACTION_RANGE[0])
      high = torch.tensor(CONTINUOUS_TRAINING_ACTION_RANGE[1])
      # rescale to range (-1, 1) as per canonical output range of continuous agents
      return rescale_actions(
          torch.tensor(raw_action),
          new_min=low,
          new_max=high,
          prev_min=self.orig_action_lower,
          prev_max=self.orig_action_upper,
      )
  
imports: import itertools
  import logging
  import random
  from typing import List, Optional, Tuple
  import numpy
  import scipy.stats
  import torch
  import torch.nn
  from reagent.core import types
  from reagent.core.parameters import CONTINUOUS_TRAINING_ACTION_RANGE
  from reagent.models.base import ModelBase
  from reagent.models.world_model import MemoryNetwork
  from reagent.training.utils import rescale_actions
  from torch.distributions.bernoulli import Bernoulli
  from torch.distributions.categorical import Categorical
  from torch.distributions.normal import Normal
label_desc: Use image node_id 7 for calling the CEMPlannerNetwork obj's underlying member method code with example usage: obj.continuous_planning(state) and returns: rescale_actions