class_docstr: Base class for operations in nodes. Operations could be machine learning
  (or statistical) models or data operations
  
  Args:
      operation_type: name of the operation
docstr: This method is used for defining and running of the evaluation strategy
  to train the operation with the data provided
  
  Args:
      params: hyperparameters for operation
      data: data used for operation training
  
  Returns:
      tuple: trained operation and prediction on train data
docstr_tok: ["This","method","is","used","for","defining","and","running","of","the","evaluation","strategy","to","train","the","operation","with","the","data","provided","Args",":","params",":","hyperparameters","for","operation","data",":","data","used","for","operation","training","Returns",":","tuple",":","trained","operation","and","prediction","on","train","data"]
code: def fit(
      self,
      params: Optional[Union[OperationParameters, dict]],
      data: InputData,
  ):
      """This method is used for defining and running of the evaluation strategy
      to train the operation with the data provided
  
      Args:
          params: hyperparameters for operation
          data: data used for operation training
  
      Returns:
          tuple: trained operation and prediction on train data
      """
      self._init(
          data.task,
          params=params,
          n_samples_data=data.features.shape[0],
      )
  
      self.fitted_operation = self._eval_strategy.fit(train_data=data)
  
      predict_train = self.predict_for_fit(
          self.fitted_operation, data, params
      )
  
      return self.fitted_operation, predict_train
  
imports: from abc import abstractmethod
  from typing import Any, Dict, Optional, Union
  from golem.core.log import default_log
  from golem.serializers.serializer import register_serializable
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.hyperparameters_preprocessing import HyperparametersPreprocessor
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.operation_types_repository import OperationMetaInfo
  from fedot.core.repository.operation_types_repository import OperationTypesRepository
  from fedot.core.repository.tasks import Task, TaskTypesEnum, compatible_task_types
  from fedot.utilities.custom_errors import AbstractMethodNotImplementError
label_desc: Use image node_id 6 for calling the Operation obj's underlying member method code with example usage: obj.fit(params, data) and returns: self,  predict_train