code: def test_ts_to_lagged_table():
      # Check first step - lagged transformation of features
      train_input, _, _ = synthetic_univariate_ts()
      new_idx, lagged_table = ts_to_table(
          idx=train_input.idx,
          time_series=train_input.features,
          window_size=_WINDOW_SIZE,
          is_lag=True,
      )
  
      correct_lagged_table = (
          (0.0, 10.0, 20.0, 30.0),
          (10.0, 20.0, 30.0, 40.0),
          (20.0, 30.0, 40.0, 50.0),
          (30.0, 40.0, 50.0, 60.0),
          (40.0, 50.0, 60.0, 70.0),
          (50.0, 60.0, 70.0, 80.0),
          (60.0, 70.0, 80.0, 90.0),
          (70.0, 80.0, 90.0, 100.0),
          (80.0, 90.0, 100.0, 110.0),
          (90.0, 100.0, 110.0, 120.0),
          (100.0, 110.0, 120.0, 130.0),
      )
  
      correct_new_idx = (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13)
  
      # Convert into tuple for comparison
      new_idx_as_tuple = tuple(new_idx)
      lagged_table_as_tuple = tuple(map(tuple, lagged_table))
      assert lagged_table_as_tuple == correct_lagged_table
      assert new_idx_as_tuple == correct_new_idx
  
      # Second step - processing for correct the target
      final_idx, features_columns, final_target = prepare_target(
          all_idx=train_input.idx,
          idx=new_idx,
          features_columns=lagged_table,
          target=train_input.target,
          forecast_length=_FORECAST_LENGTH,
      )
      correct_final_idx = (4, 5, 6, 7, 8, 9, 10)
      correct_features_columns = (
          (0.0, 10.0, 20.0, 30.0),
          (10.0, 20.0, 30.0, 40.0),
          (20.0, 30.0, 40.0, 50.0),
          (30.0, 40.0, 50.0, 60.0),
          (40.0, 50.0, 60.0, 70.0),
          (50.0, 60.0, 70.0, 80.0),
          (60.0, 70.0, 80.0, 90.0),
      )
  
      correct_final_target = (
          (40.0, 50.0, 60.0, 70.0),
          (50.0, 60.0, 70.0, 80.0),
          (60.0, 70.0, 80.0, 90.0),
          (70.0, 80.0, 90.0, 100.0),
          (80.0, 90.0, 100.0, 110.0),
          (90.0, 100.0, 110.0, 120.0),
          (100.0, 110.0, 120.0, 130.0),
      )
  
      # Convert into tuple for comparison
      final_idx_as_tuple = tuple(final_idx)
      features_columns_as_tuple = tuple(map(tuple, features_columns))
      final_target_as_tuple = tuple(map(tuple, final_target))
  
      assert final_idx_as_tuple == correct_final_idx
      assert features_columns_as_tuple == correct_features_columns
      assert final_target_as_tuple == correct_final_target
  
imports: import logging
  from copy import deepcopy
  import numpy
  import pytest
  from golem.core.log import default_log
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.operations.evaluation.operation_implementations.data_operations.ts_transformations import _sparse_matrix, prepare_target, ts_to_table
  from fedot.core.optimisers.objective import MetricsObjective, PipelineObjectiveEvaluate
  from fedot.core.optimisers.objective.data_source_splitter import DataSourceSplitter
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.pipeline_builder import PipelineBuilder
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
label_desc: Use image node_id 6 for calling a global function with example usage: test_ts_to_lagged_table() without return types