code: def _compute_inverse_bounds(
      power_transforms: Dict[str, PowerTransformer], tol: float = 1e-10
  ) -> Dict[str, Tuple[float, float]]:
      """Computes the image of the transform so we can clip when we untransform.
  
      The inverse of the Yeo-Johnson transform is given by:
      if X >= 0 and lambda == 0:
          X = exp(X_trans) - 1
      elif X >= 0 and lambda != 0:
          X = (X_trans * lambda + 1) ** (1 / lambda) - 1
      elif X < 0 and lambda != 2:
          X = 1 - (-(2 - lambda) * X_trans + 1) ** (1 / (2 - lambda))
      elif X < 0 and lambda == 2:
          X = 1 - exp(-X_trans)
  
      We can break this down into three cases:
      lambda < 0:        X < -1 / lambda
      0 <= lambda <= 2:  X is unbounded
      lambda > 2:        X > 1 / (2 - lambda)
  
      Sklearn standardizes the transformed values to have mean zero and standard
      deviation 1, so we also need to account for this when we compute the bounds.
      """
      inv_bounds = defaultdict()
      for k, pt in power_transforms.items():
          bounds = [-np.inf, np.inf]
          mu, sigma = (
              pt._scaler.mean_.item(),
              pt._scaler.scale_.item(),
          )  # pyre-ignore
          lambda_ = pt.lambdas_.item()  # pyre-ignore
          if lambda_ < -1 * tol:
              bounds[1] = (-1.0 / lambda_ - mu) / sigma
          elif lambda_ > 2.0 + tol:
              bounds[0] = (1.0 / (2.0 - lambda_) - mu) / sigma
          inv_bounds[k] = tuple(checked_cast_list(float, bounds))
      return inv_bounds
  
imports: from __future__ import annotations
  from collections import defaultdict
  from logging import Logger
  from typing import Dict, List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint, ScalarizedOutcomeConstraint
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.utils import get_data, match_ci_width_truncated
  from ax.models.types import TConfig
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast_list
  from sklearn.preprocessing import PowerTransformer
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_inverse_bounds(power_transforms, tol) and returns: inv_bounds