code: def estimator_results_to_cpe_estimate(
      estimator_results: EstimatorResults,
  ) -> CpeEstimate:
      scores = torch.tensor(
          [r.estimated_reward for r in estimator_results.results],
          dtype=torch.double,
      )
      log_scores = torch.tensor(
          [r.log_reward for r in estimator_results.results],
          dtype=torch.double,
      )
  
      dr_score = float(torch.mean(scores).item())
      dr_score_std_error = bootstrapped_std_error_of_mean(scores)
  
      log_score = float(torch.mean(log_scores).item())
      if log_score < 1e-6:
          logger.warning(
              "Can't normalize SDR-CPE because of small"
              f" or negative logged_policy_score ({log_score})."
              f"Episode values: {log_scores}."
          )
          return CpeEstimate(
              raw=dr_score,
              normalized=0.0,
              raw_std_error=dr_score_std_error,
              normalized_std_error=0.0,
          )
      return CpeEstimate(
          raw=dr_score,
          normalized=dr_score / log_score,
          raw_std_error=dr_score_std_error,
          normalized_std_error=dr_score_std_error / log_score,
      )
  
imports: import logging
  import torch
  from reagent.evaluation.cpe import bootstrapped_std_error_of_mean, CpeEstimate, CpeEstimateSet
  from reagent.evaluation.evaluation_data_page import EvaluationDataPage
  from reagent.evaluation.evaluator import Evaluator
  from reagent.evaluation.weighted_sequential_doubly_robust_estimator import WeightedSequentialDoublyRobustEstimator
  from reagent.ope.estimators.contextual_bandits_estimators import BanditsEstimatorInput, DMEstimator, DoublyRobustEstimator, IPSEstimator, LogSample, ModelOutputs
  from reagent.ope.estimators.estimator import Estimator, EstimatorResult, EstimatorResults
  from reagent.ope.estimators.sequential_estimators import Action, ActionDistribution, DoublyRobustEstimator, MAGICEstimator, RLEstimator, RLEstimatorInput, RLPolicy, State, Transition, ValueFunction
  from reagent.ope.estimators.types import ActionSpace
label_desc: Use image node_id 3 for calling the SequentialOPEstimatorAdapter obj's underlying member method code with example usage: obj.estimator_results_to_cpe_estimate(estimator_results) and returns: CpeEstimate, CpeEstimate