code: def predict_for_fit(self, input_data: InputData) -> OutputData:
      f_x = input_data.idx
      f_y = np.polyval(self.coefs, f_x)
      input_data = copy(input_data)
      parameters = input_data.task.task_params
      forecast_length = parameters.forecast_length
      old_idx = input_data.idx
      target = input_data.target
  
      _, predict = ts_to_table(
          idx=old_idx, time_series=f_y, window_size=forecast_length
      )
      new_idx, target_columns = ts_to_table(
          idx=old_idx, time_series=target, window_size=forecast_length
      )
  
      # Update idx and target
      input_data.idx = new_idx
      input_data.target = target_columns
      output_data = self._convert_to_output(
          input_data, predict=predict, data_type=DataTypesEnum.table
      )
      return output_data
  
file_path: FEDOT/fedot/core/operations/evaluation/operation_implementations/models/ts_implementations/poly.py
imports: from copy import copy
  from typing import Optional
  import numpy
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.evaluation.operation_implementations.data_operations.ts_transformations import ts_to_table
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import ModelImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.dataset_types import DataTypesEnum
label_desc: Use image node_id 6 for calling the PolyfitImplementation obj's underlying member method code with example usage: obj.predict_for_fit(input_data) and returns: output_data