code: def custom_metric_for_synt_data(
      pipeline, fit_data, predict_data, **kwargs
  ):
      # reference_data is added for compatibility with composer interface
      pipeline.fit_from_scratch(fit_data)
      results = pipeline.predict(predict_data)
      error = mean_squared_error(
          y_true=results.target, y_pred=results.predict, squared=False
      )
      return error
  
file_path: FEDOT/test/integration/quality/test_synthetic_tasks.py
imports: import logging
  import os
  from functools import partial
  from sklearn.metrics import mean_squared_error
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from test.integration.composer.test_composer import to_categorical_codes
label_desc: Use image node_id 3 for calling a global function with example usage: custom_metric_for_synt_data(pipeline, fit_data, predict_data) and returns: error