code: def get_mock_study():
      mock_algorithm = mock.MagicMock()
      mock_algorithm.get_suggestion.return_value = {"a": 1, "b": 2}
      mock_stopping_rule = mock.MagicMock()
  
      return sherpa.Study(
          parameters=[
              sherpa.Discrete("a", [1, 2]),
              sherpa.Choice("b", [2, 5, 7]),
          ],
          algorithm=mock_algorithm,
          stopping_rule=mock_stopping_rule,
          lower_is_better=True,
          disable_dashboard=True,
      )
  
file_path: sherpa/tests/testing_utils.py
imports: import pytest
  import sherpa
  import sherpa.core
  import sherpa.schedulers
  import sherpa.database
  import logging
  import tempfile
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: get_mock_study() and returns: sherpa