code: def test_linear_interpolation() -> None:
      tol = 1e-7
      x_coord = [0.1, 0.5, 0.9]
      y_coord = [
          np.array([0.1, 0.5, 1]),
          np.array([1.0, 2.0, 3.0]),
          np.array([0.25, 0.5, 0.9]),
      ]
  
      x = 0.75
      exact = y_coord[1] + (x - x_coord[1]) * (
          y_coord[2] - y_coord[1]
      ) / (x_coord[2] - x_coord[1])
      assert np.all(
          np.abs(exact - _linear_interpolation(x_coord, y_coord, x))
          <= tol
      )
  
file_path: gluonts/test/model/test_forecast.py
imports: import numpy
  import pandas
  import pytest
  from gluonts.model.forecast import QuantileForecast, SampleForecast, _linear_interpolation, ExponentialTailApproximation
label_desc: Use image node_id 5 for calling a global function with example usage: test_linear_interpolation() without return types