code: def test_num_classes_is_required_for_multiclass_classifier(
      sagemaker_session,
  ):
      with pytest.raises(ValueError) as excinfo:
          test_params = ALL_REQ_ARGS.copy()
          test_params["predictor_type"] = "multiclass_classifier"
          LinearLearner(
              sagemaker_session=sagemaker_session, **test_params
          )
      assert (
          "For predictor_type 'multiclass_classifier', 'num_classes' should be set to a value greater than 2."
          in str(excinfo.value)
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker import image_uris
  from sagemaker.amazon.linear_learner import LinearLearner, LinearLearnerPredictor
  from sagemaker.amazon.amazon_estimator import RecordSet
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 8 for calling a global function with example usage: test_num_classes_is_required_for_multiclass_classifier(sagemaker_session) without return types