class_docstr: Tests prediction utilities.
code: def test_predict_by_features(self) -> None:
      ax_client = (
          _set_up_client_for_get_model_predictions_no_next_trial()
      )
      _attach_completed_trials(ax_client)
      ax_client.get_model_predictions()  # Ensures model is instantiated
  
      observation_features_dict = {
          18: ObservationFeatures(parameters={"x1": 0.3, "x2": 0.5}),
          19: ObservationFeatures(parameters={"x1": 0.4, "x2": 0.5}),
          20: ObservationFeatures(parameters={"x1": 0.8, "x2": 0.5}),
      }
      predictions_map = predict_by_features(
          model=not_none(ax_client.generation_strategy.model),
          label_to_feature_dict=observation_features_dict,
          metric_names={"test_metric1"},
      )
      self.assertEqual(len(predictions_map), 3)
  
file_path: Ax/ax/modelbridge/tests/test_prediction_utils.py
imports: from unittest import mock
  import numpy
  from ax.core.observation import ObservationFeatures
  from ax.core.types import TEvaluationOutcome, TParameterization
  from ax.modelbridge.prediction_utils import predict_at_point, predict_by_features
  from ax.service.ax_client import AxClient
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 2 for calling the TestPredictionUtils obj's underlying member method code with example usage: obj.test_predict_by_features() without return types