class_docstr: Wraps model that uses index to retrieve text data for making
  predictions.
class_docstr_tok: ["Wraps","model","that","uses","index","to","retrieve","text","data","for","making","predictions","."]
code: def _raise_user_error_on_prediction_failure(
      self, func, *args, **kwargs
  ):
      try:
          return func(*args, **kwargs)
      except Exception as ex:
          raise UserErrorException(
              "Unable to use user model to retrieve predictions"
              f" from given dataset. Original exception: {ex}"
          )
  
imports: import json
  import numbers
  from typing import Any, List, Optional, Union
  import jsonschema
  import numpy
  import pandas
  from ml_wrappers import wrap_model
  from erroranalysis._internal.error_analyzer import ModelAnalyzer
  from erroranalysis._internal.error_report import as_error_report
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.exceptions import UserErrorException
  from responsibleai.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai.managers.error_analysis_manager import as_error_config
  from responsibleai_text.common.constants import ModelTask
  from responsibleai_text.utils.feature_extractors import get_text_columns
label_desc: Use image node_id 4 for calling the WrappedIndexPredictorModel obj's underlying member method code with example usage: obj._raise_user_error_on_prediction_failure(func) and returns: func