code: def prepare_input_data(features, target):
      """Function create InputData with features"""
      (
          x_data_train,
          x_data_test,
          y_data_train,
          y_data_test,
      ) = train_test_split(
          features, target, test_size=0.2, shuffle=True, random_state=10
      )
      y_data_test = np.ravel(y_data_test)
  
      # Define regression task
      task = Task(TaskTypesEnum.regression)
  
      # Prepare data to train the model
      train_input = InputData(
          idx=np.arange(0, len(x_data_train)),
          features=x_data_train,
          target=y_data_train,
          task=task,
          data_type=DataTypesEnum.table,
      )
  
      predict_input = InputData(
          idx=np.arange(0, len(x_data_test)),
          features=x_data_test,
          target=y_data_test,
          task=task,
          data_type=DataTypesEnum.table,
      )
  
      return train_input, predict_input, task
  
file_path: FEDOT/examples/advanced/decompose/regression_refinement_example.py
imports: import warnings
  import numpy
  import pandas
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from sklearn.metrics import mean_absolute_error, mean_squared_error
  from sklearn.model_selection import train_test_split
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import RegressionMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import fedot_project_root
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_input_data(features, target) and returns: train_input,  predict_input,  task