code: def test_tabular_raise_on_nonfinite_class_labels():
      predictor = TabularPredictor(label="y")
      nonfinite_values = [np.nan, np.inf, np.NINF]
  
      for idx, nonfinite_value in enumerate(nonfinite_values):
          train_data = TabularDataset(
              {
                  "x": [0.0, 1.0, 2.0, 3.0, 4.0],
                  "y": ["a", "b", "c", "d", "e"],
              }
          )
          train_data.loc[idx, "y"] = nonfinite_value
  
          with pytest.raises(ValueError) as ex_info:
              predictor.fit(train_data)
          assert str(ex_info.value).split()[-1] == str(idx)
  
imports: import os
  import shutil
  import sys
  import tempfile
  import warnings
  from random import seed
  import numpy
  import pandas
  import pytest
  from networkx.exception import NetworkXError
  from autogluon.common import space
  from autogluon.common.utils.simulation_utils import convert_simulation_artifacts_to_tabular_predictions_dict
  from autogluon.core.constants import BINARY, MULTICLASS, PROBLEM_TYPES_CLASSIFICATION, QUANTILE, REGRESSION
  from autogluon.core.utils import download, unzip
  from autogluon.tabular import TabularDataset, TabularPredictor
  from autogluon.tabular.configs.hyperparameter_configs import get_hyperparameter_config
label_desc: Use image node_id 25 for calling a global function with example usage: test_tabular_raise_on_nonfinite_class_labels() without return types