code: def _calc_estimated_values(
      self,
      logged_rewards: torch.Tensor,
      weights: torch.Tensor,
      actions: torch.Tensor,
      threshold: float,
      est_rewards: torch.Tensor,
      est_rewards_for_logged_action: torch.Tensor,
      tgt_props: torch.Tensor,
  ) -> torch.Tensor:
      ips_scores = (weights * actions).sum(dim=1, keepdim=True)
      return logged_rewards * ips_scores * (
          ips_scores <= threshold
      ).float() + (
          est_rewards * tgt_props * (weights > threshold).float()
      ).sum(
          dim=1, keepdim=True
      )
  
imports: import logging
  import time
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from typing import Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from reagent.ope.estimators.estimator import Estimator, EstimatorResult
  from reagent.ope.estimators.types import Action, ActionDistribution, ActionSpace, Reward, Trainer, TrainingData, Values
  from reagent.ope.utils import Clamper, RunningAverage
  from torch import Tensor
label_desc: Use image node_id 4 for calling the SwitchEstimator obj's underlying member method code with example usage: obj._calc_estimated_values(logged_rewards, weights, actions, threshold, est_rewards, est_rewards_for_logged_action, tgt_props) and returns: unknown