code: def get_base_quantiles(
      train_input: InputData, pipeline: Pipeline, nominal_error: int
  ):
      """This function computes quantiles of residuals of forecast of a given pipeline over train data."""
  
      p = pipeline.fit(train_input)
      preds = fitted_values(train_input, p).predict
      train = train_input.features
      resids = train[-len(preds) :] - preds
  
      ans = {
          "low": np.quantile(
              resids, nominal_error / 2, method="median_unbiased"
          ),
          "up": np.quantile(
              resids, 1 - nominal_error / 2, method="median_unbiased"
          ),
      }
  
      return ans
  
file_path: FEDOT/fedot/core/pipelines/prediction_intervals/utils.py
imports: import numpy
  from typing import List
  from fedot.core.pipelines.ts_wrappers import fitted_values
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from golem.core.optimisers.opt_history_objects.individual import Individual
  from fedot.core.pipelines.prediction_intervals.params import PredictionIntervalsParams
  from fedot.core.pipelines.prediction_intervals.graph_distance import get_distance_between
label_desc: Use image node_id 4 for calling a global function with example usage: get_base_quantiles(train_input, pipeline, nominal_error) and returns: ans