code: def get_ugly_ts_df():
      data = np.random.random_sample((100, 5))
      mask = np.random.random_sample((100, 5))
      newmask = mask.copy()
      mask[newmask >= 0.4] = 2
      mask[newmask < 0.4] = 1
      mask[newmask < 0.2] = 0
      data[mask == 0] = None
      data[mask == 1] = np.nan
      df = pd.DataFrame(data, columns=["a", "b", "c", "d", "e"])
      df["a"][0] = np.nan  # make sure column 'a' has a N/A
      df["datetime"] = pd.date_range("1/1/2019", periods=100)
      df.loc[50:100, "datetime"] = pd.date_range("1/1/2019", periods=50)
      df["id"] = np.array(["00"] * 50 + ["01"] * 50)
      return df
  
imports: import pytest
  import numpy
  import pandas
  import random
  import os
  from unittest import TestCase
  from bigdl.chronos.data import TSDataset
  from bigdl.chronos.utils import LazyImport
  from ...None import op_torch, op_distributed
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 2 for calling a global function with example usage: get_ugly_ts_df() and returns: df