code: def test_topological_node(
      length, features_count, target_count, window_size
  ):
      data = get_timeseries(
          length=length,
          features_count=features_count,
          target_count=target_count,
          random=True,
      )
      train, test = train_test_data_setup(data, split_ratio=0.5)
      forecast_length = data.task.task_params.forecast_length
      lagged_node = PipelineNode("lagged")
      lagged_node.parameters = {"window_size": window_size}
      topo_input = lagged_node.fit(train)
      topological_node = PipelineNode("topological_features")
      fit_res = topological_node.fit(topo_input)
      assert np.all(
          fit_res.idx == train.idx[window_size : -forecast_length + 1]
      )
      unique_rows, counts = np.unique(
          fit_res.predict, return_counts=True
      )
      assert len(counts) != 1
  
      topo_input = lagged_node.predict(test)
      topo_input = InputData(
          idx=topo_input.idx,
          features=topo_input.predict,
          target=topo_input.target,
          data_type=topo_input.data_type,
          task=topo_input.task,
      )
      fit_res = topological_node.predict(topo_input)
      unique_rows, counts = np.unique(
          fit_res.predict, return_counts=True
      )
      assert len(counts) != 1
  
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 17 for calling a global function with example usage: test_topological_node(length, features_count, target_count, window_size) without return types