code: def test_knn_reg_with_invalid_params_fit_correctly():
      """The function define a pipeline with incorrect parameters in the K-nn regression
      model. During the training of the pipeline, the parameter 'n_neighbors' is corrected
      """
      samples_amount = 100
      k_neighbors = 150
  
      features_options = {"informative": 1, "bias": 0.0}
      features_amount = 3
      x_data, y_data = regression_dataset(
          samples_amount=samples_amount,
          features_amount=features_amount,
          features_options=features_options,
          n_targets=1,
          noise=0.0,
          shuffle=True,
      )
  
      # Define regression task
      task = Task(TaskTypesEnum.regression)
  
      # Prepare data to train the model
      train_input = InputData(
          idx=np.arange(0, len(x_data)),
          features=x_data,
          target=y_data,
          task=task,
          data_type=DataTypesEnum.table,
      )
  
      # Prepare regression pipeline
      pipeline = get_knn_reg_pipeline(k_neighbors)
  
      # Fit it
      pipeline.fit(train_input)
  
      is_pipeline_was_fitted = True
      assert is_pipeline_was_fitted
  
file_path: FEDOT/test/integration/models/test_models_params.py
imports: import numpy
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.utilities.synth_dataset_generator import classification_dataset, regression_dataset
label_desc: Use image node_id 3 for calling a global function with example usage: test_knn_reg_with_invalid_params_fit_correctly() without return types