code: def test_partial_test_data():
      """Tests if forecast evaluation can handle partially missing data"""
      df = pd.DataFrame(
          {
              cst.TIME_COL: [
                  "2018-01-01",
                  datetime.datetime(2018, 1, 2),
                  "2018-01-03",
                  "2018-01-04",
                  "2018-01-05",
              ],
              cst.ACTUAL_COL: [1, 2, 3, 2, np.nan],
              cst.PREDICTED_COL: [1, 4, 1, 2, 4],
              cst.PREDICTED_LOWER_COL: [1, 1, 1, 1, 2],
              cst.PREDICTED_UPPER_COL: [4, 5, 4, 4, 6],
              cst.NULL_PREDICTED_COL: [1.5, 1.5, 1.5, 1.5, 1.5],
          }
      )
  
      with pytest.warns(UserWarning) as record:
          forecast = UnivariateForecast(
              df, train_end_date=datetime.datetime(2018, 1, 2)
          )
          forecast2 = UnivariateForecast(
              df.iloc[:4,], train_end_date=datetime.datetime(2018, 1, 2)
          )
          assert forecast.test_na_count == 1
          assert (
              "1 value(s) in y_true were NA or infinite and are omitted in error calc."
              in record[0].message.args[0:2]
          )
          assert_equal(
              forecast.train_evaluation, forecast2.train_evaluation
          )
          assert_equal(
              forecast.test_evaluation, forecast2.test_evaluation
          )
  
imports: import datetime
  import math
  import sys
  from functools import partial
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from pandas.testing import assert_series_equal
  from sklearn.pipeline import Pipeline
  from greykite.common import constants
  from greykite.common.evaluation import ElementwiseEvaluationMetricEnum
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import gen_sliced_df
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
  from greykite.framework.output.univariate_forecast import UnivariateForecast
  from greykite.framework.pipeline.utils import get_forecast
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
  from greykite.sklearn.estimator.testing_utils import params_component_breakdowns
label_desc: Use image node_id 8 for calling a global function with example usage: test_partial_test_data() without return types