code: def test_data_with_nans_in_target_process_correctly():
      """K-nn model should use 4 samples to train instead of 6 source due to
      two rows will be removed. So, when n_neighbors was corrected, value must be
      replaced using the following: new value = round(4 / 2). So, 2 instead of 3.
  
      The same test for multi target table.
      """
  
      knn_node = PipelineNode("knnreg")
      knn_node.parameters = {"n_neighbors": 10}
      pipeline = Pipeline(knn_node)
  
      # Single target column processing
      single_target_data = data_with_nans_in_target_column()
      pipeline.fit(single_target_data)
      single_hyperparams = pipeline.nodes[0].parameters
      # Multi-target columns processing
      multi_target_data = data_with_nans_in_multi_target()
      pipeline.unfit()
      pipeline.fit(multi_target_data)
      multi_hyperparams = pipeline.nodes[0].parameters
      assert 2 == single_hyperparams["n_neighbors"]
      assert 2 == multi_hyperparams["n_neighbors"]
  
imports: import numpy
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.supplementary_data import SupplementaryData
  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 TaskTypesEnum, Task
  from fedot.preprocessing.categorical import BinaryCategoricalPreprocessor
  from fedot.preprocessing.data_types import TableTypesCorrector
  from fedot.preprocessing.structure import DEFAULT_SOURCE_NAME
  from test.unit.data_operations.test_data_operations_implementations import get_mixed_data
  from test.unit.preprocessing.test_preprocessing_through_api import data_with_only_categorical_features, data_with_too_much_nans, data_with_spaces_and_nans_in_features, data_with_nans_in_target_column, data_with_nans_in_multi_target, data_with_categorical_target
label_desc: Use image node_id 6 for calling a global function with example usage: test_data_with_nans_in_target_process_correctly() without return types