code: def test_generate_counterfactuals_user_config_validations_regression(
      self,
      regression_exp_object,
      sample_custom_query_1,
      method,
      explainer_function,
  ):
      explainer_function = getattr(
          regression_exp_object, explainer_function
      )
      with pytest.raises(
          UserConfigValidationException,
          match=r"The desired_range parameter should be set for regression task",
      ):
          explainer_function(
              query_instances=sample_custom_query_1, total_CFs=10
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match=r"The parameter desired_range needs to have two numbers in ascending order.",
      ):
          explainer_function(
              query_instances=sample_custom_query_1,
              total_CFs=10,
              desired_range=[1, 3, 4],
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match=r"The range provided in desired_range should be in ascending order.",
      ):
          explainer_function(
              query_instances=sample_custom_query_1,
              total_CFs=10,
              desired_range=[4, 3],
          )
  
imports: import re
  import numpy
  import pandas
  import pytest
  from rai_test_utils.datasets.tabular import create_housing_data
  from raiutils.exceptions import UserConfigValidationException
  from sklearn.ensemble import RandomForestRegressor
  import dice_ml
  from dice_ml.diverse_counterfactuals import CounterfactualExamples
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
  from dice_ml.utils import helpers
  from ..conftest import _load_custom_testing_binary_model
label_desc: Use image node_id 2 for calling the TestExplainerBaseUserConfigValidations obj's underlying member method code with example usage: obj.test_generate_counterfactuals_user_config_validations_regression(regression_exp_object, sample_custom_query_1, method, explainer_function) without return types