code: def test_call_oracle_single_y_value(
      Constraints, eps, y_value, mocker
  ):
      X_dict = {
          "c": [0, 1, 4, 1, 5, 1, 6, 0, 2, 4],
          "d": [1, 5, 1, 6, 2, 3, 5, 1, 5, 2],
      }
      X = pd.DataFrame(X_dict)
  
      # Try with both possible y values for binary classification to ensure that
      # constraints that focus only on positives or negatives can handle the
      # case where none of the rows apply to them.
      y = pd.Series([y_value] * 10)
      A = pd.Series([0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
  
      # We mock the estimator, but we only patch it for pickling
      estimator = mocker.MagicMock()
      if issubclass(Constraints, LossMoment):
          constraints = Constraints(ZeroOneLoss(), upper_bound=eps)
      else:
          constraints = Constraints(difference_bound=eps)
  
      lagrangian = _Lagrangian(
          X=X,
          y=y,
          estimator=estimator,
          constraints=deepcopy(constraints),
          B=1 / eps,
          sensitive_features=A,
      )
  
      # Set up initial lambda vector based on a 0-initialized theta and use separate constraints
      # object for it to avoid the dependence on the lagrangian object.
      lambda_vec = get_lambda_vec(constraints, X, y, A)
  
      test_X_dict = {"c": [10000], "d": [2000000]}
      test_X = pd.DataFrame(test_X_dict)
  
      result_estimator = lagrangian._call_oracle(lambda_vec)
      assert isinstance(result_estimator, DummyClassifier)
      assert result_estimator.predict(test_X) == y_value
      assert lagrangian.n_oracle_calls_dummy_returned == 1
  
      # Make sure the mocked estimator wasn't called
      assert len(estimator.method_calls) == 0
  
file_path: fairlearn/test/unit/reductions/exponentiated_gradient/test_lagrangian.py
imports: from copy import deepcopy
  import numpy
  import pandas
  import pytest
  from sklearn.base import BaseEstimator
  from sklearn.dummy import DummyClassifier
  from fairlearn.reductions import BoundedGroupLoss, DemographicParity, EqualizedOdds, ErrorRate, ErrorRateParity, FalsePositiveRateParity, LossMoment, TruePositiveRateParity, ZeroOneLoss
  from fairlearn.reductions._exponentiated_gradient._lagrangian import _MESSAGE_BAD_OBJECTIVE, _Lagrangian
  from fairlearn.reductions._moments.bounded_group_loss import MeanLoss
  from .simple_learners import LeastSquaresBinaryClassifierLearner, MockEstimator
  from .test_utilities import _get_data
label_desc: Use image node_id 3 for calling a global function with example usage: test_call_oracle_single_y_value(Constraints, eps, y_value, mocker) without return types