code: def create_policy(
      self,
      trainer_module: ReAgentLightningModule,
      serving: bool = False,
      normalization_data_map: Optional[
          Dict[str, NormalizationData]
      ] = None,
  ) -> Policy:
      assert isinstance(trainer_module, CEMTrainer)
      # pyre-fixme[16]: `CrossEntropyMethod` has no attribute `discrete_action`.
      return CEMPolicy(
          trainer_module.cem_planner_network, self.discrete_action
      )
  
imports: import logging
  from typing import Dict, Optional
  import numpy
  import reagent.core.types
  import torch
  from reagent.core.dataclasses import dataclass, field
  from reagent.core.parameters import CEMTrainerParameters, NormalizationData, NormalizationKey, param_hash
  from reagent.gym.policies.policy import Policy
  from reagent.model_managers.model_based.world_model import WorldModel
  from reagent.model_managers.world_model_base import WorldModelBase
  from reagent.models.cem_planner import CEMPlannerNetwork
  from reagent.preprocessing.identify_types import CONTINUOUS_ACTION
  from reagent.preprocessing.normalization import get_num_output_features
  from reagent.training import ReAgentLightningModule
  from reagent.training.cem_trainer import CEMTrainer
  from reagent.workflow.types import RewardOptions
label_desc: Use image node_id 2 for calling the CrossEntropyMethod obj's underlying member method code with example usage: obj.create_policy(trainer_module, serving, normalization_data_map) and returns: CEMPolicy