code: def best_observed_point(
      model: TorchModelLike,
      bounds: List[Tuple[float, float]],
      objective_weights: Optional[Tensoray],
      outcome_constraints: Optional[Tuple[Tensoray, Tensoray]] = None,
      linear_constraints: Optional[Tuple[Tensoray, Tensoray]] = None,
      fixed_features: Optional[Dict[int, float]] = None,
      risk_measure: Optional[RiskMeasureMCObjective] = None,
      options: Optional[TConfig] = None,
  ) -> Optional[Tensoray]:
      """Select the best point that has been observed.
  
      Implements two approaches to selecting the best point.
  
      For both approaches, only points that satisfy parameter space constraints
      (bounds, linear_constraints, fixed_features) will be returned. Points must
      also be observed for all objective and constraint outcomes. Returned
      points may violate outcome constraints, depending on the method below.
  
      1: Select the point that maximizes the expected utility
      (objective_weights^T posterior_objective_means - baseline) * Prob(feasible)
      Here baseline should be selected so that at least one point has positive
      utility. It can be specified in the options dict, otherwise
      min (objective_weights^T posterior_objective_means)
      will be used, where the min is over observed points.
  
      2: Select the best-objective point that is feasible with at least
      probability p.
  
      The following quantities may be specified in the options dict:
  
      - best_point_method: 'max_utility' (default) or 'feasible_threshold'
        to select between the two approaches described above.
      - utility_baseline: Value for the baseline used in max_utility approach. If
        not provided, defaults to min objective value.
      - probability_threshold: Threshold for the feasible_threshold approach.
        Defaults to p=0.95.
      - feasibility_mc_samples: Number of MC samples used for estimating the
        probability of feasibility (defaults 10k).
  
      Args:
          model: A Torch model or Surrogate.
          bounds: A list of (lower, upper) tuples for each feature.
          objective_weights: The objective is to maximize a weighted sum of
              the columns of f(x). These are the weights.
          outcome_constraints: A tuple of (A, b). For k outcome constraints
              and m outputs at f(x), A is (k x m) and b is (k x 1) such that
              A f(x) <= b.
          linear_constraints: A tuple of (A, b). For k linear constraints on
              d-dimensional x, A is (k x d) and b is (k x 1) such that
              A x <= b.
          fixed_features: A map {feature_index: value} for features that
              should be fixed to a particular value in the best point.
          risk_measure: An optional risk measure for reporting best robust point.
          options: A config dictionary with settings described above.
  
      Returns:
          A d-array of the best point, or None if no feasible point exists.
      """
      if not hasattr(model, "Xs"):
          raise ValueError(
              f"Model must store training data Xs, but {model} does not."
          )
      best_point_and_value = best_in_sample_point(
          Xs=model.Xs,  # pyre-ignore[16]: Presence of attr. checked above.
          model=model,
          bounds=bounds,
          objective_weights=objective_weights,
          outcome_constraints=outcome_constraints,
          linear_constraints=linear_constraints,
          fixed_features=fixed_features,
          risk_measure=risk_measure,
          options=options,
      )
      return (
          None
          if best_point_and_value is None
          else best_point_and_value[0]
      )
  
imports: from __future__ import annotations
  import itertools
  import warnings
  from typing import Callable, Dict, List, Optional, Protocol, Set, Tuple, Union
  import numpy
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.exceptions.core import SearchSpaceExhausted, UnsupportedError
  from ax.models.types import TConfig
  from ax.utils.common.typeutils import checked_cast
  from botorch.acquisition.risk_measures import RiskMeasureMCObjective
  from torch import Tensor
label_desc: Use image node_id 7 for calling a global function with example usage: best_observed_point(model, bounds, objective_weights, outcome_constraints, linear_constraints, fixed_features, risk_measure, options) and returns: unknown