code: def test_fail_on_too_many_classes():
      df = pd.DataFrame(
          {
              "system_record_id": range(200),
              "phone": np.random.randint(10000000000, 99999999999, 200),
              "f": ["123"] * 200,
              "target": range(200),
          }
      )
      dataset = Dataset("test123", df=df)  # type: ignore
      dataset.meaning_types = {
          "system_record_id": FileColumnMeaningType.SYSTEM_RECORD_ID,
          "phone": FileColumnMeaningType.MSISDN,
          "f": FileColumnMeaningType.FEATURE,
          "target": FileColumnMeaningType.TARGET,
      }
      dataset.task_type = ModelTaskType.MULTICLASS
      with pytest.raises(
          ValidationError,
          match=r".*The number of target classes .+ exceeds the allowed threshold.*",
      ):
          dataset._Dataset__resample()
  
imports: import ipaddress
  import random
  from datetime import date, datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from upgini import Dataset, FileColumnMeaningType
  from upgini.errors import ValidationError
  from upgini.metadata import ModelTaskType, SearchKey
  from upgini.resource_bundle import bundle
  from upgini.utils.datetime_utils import DateTimeSearchKeyConverter
  from upgini.utils.email_utils import EmailSearchKeyConverter
  from upgini.utils.features_validator import FeaturesValidator
  from upgini.utils.warning_counter import WarningCounter
label_desc: Use image node_id 15 for calling a global function with example usage: test_fail_on_too_many_classes() without return types