code: def constrained_variance(self, mean, var):
      lb_dist, ub_dist = (
          mean - self.action_lower_bounds,
          self.action_upper_bounds - mean,
      )
      return np.minimum(
          np.minimum((lb_dist / 2) ** 2, (ub_dist / 2) ** 2), var
      )
  
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 6 for calling the CEMPlannerNetwork obj's underlying member method code with example usage: obj.constrained_variance(mean, var) and returns: np