class_docstr: Generator for Thompson sampling using Empirical Bayes estimates.
  
  The generator applies positive-part James-Stein Estimator to the data
  passed in via `fit` and then performs Thompson Sampling.
code: def _apply_shrinkage(
      self, Y: List[float], Yvar: List[float], outcome: int
  ) -> Tuple[List[float], List[float]]:
      npY = np.array(Y)
      npYvar = np.array(Yvar)
      npYsem = np.sqrt(Yvar)
      try:
          npY, npYsem = positive_part_james_stein(
              means=npY, sems=npYsem
          )
      except ValueError as e:
          logger.warning(
              str(e)
              + f" Raw (unshrunk) estimates used for outcome: {outcome}"
          )
      Y = npY.tolist()
      npYvar = npYsem**2
      Yvar = npYvar.tolist()
      return Y, Yvar
  
file_path: Ax/ax/models/discrete/eb_thompson.py
imports: import logging
  from typing import List, Tuple
  import numpy
  from ax.models.discrete.thompson import ThompsonSampler
  from ax.utils.common.logger import get_logger
  from ax.utils.stats.statstools import positive_part_james_stein
label_desc: Use image node_id 2 for calling the EmpiricalBayesThompsonSampler obj's underlying member method code with example usage: obj._apply_shrinkage(Y, Yvar, outcome) and returns: Y,  Yvar