code: def test_predefined_model_task_mismatch_is_caught(train_input):
      # task is regression, but model is for classification
      problem = "regression"
      predefined_model = "logit"
      model = Fedot(problem=problem)
  
      with pytest.raises(ValueError):
          model.fit(
              features=train_input, predefined_model=predefined_model
          )
  
imports: import logging
  from copy import deepcopy
  import pytest
  from examples.simple.classification.classification_pipelines import classification_pipeline_with_balancing, classification_pipeline_without_balancing
  from fedot import Fedot
  from fedot.api.api_utils.assumptions.assumptions_builder import AssumptionsBuilder
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.preprocessing.preprocessing import DataPreprocessor
  from test.data.datasets import get_cholesterol_dataset
  from test.integration.api.test_main_api import get_dataset
  from test.unit.tasks.test_classification import get_binary_classification_data
label_desc: Use image node_id 4 for calling a global function with example usage: test_predefined_model_task_mismatch_is_caught(train_input) without return types