code: def generate_anomaly_data_hourly():
      """Generates hourly data to be used for end-to-end AD testing."""
      anomaly_block_list = [
          np.arange(1000, 1050),
          np.arange(5000, 5100),
          np.arange(8000, 8050),
      ]
      res = generate_anomaly_data(
          freq="H",
          periods=24 * 400,
          anomaly_block_list=anomaly_block_list,
      )
      # Introduces missing data
      res["df"][VALUE_COL].iloc[150:160] = np.nan
      # Changes the datetype format of time column
      res["df"][TIME_COL] = res["df"][TIME_COL].dt.strftime(
          "%Y-%m-%d-%H"
      )
      # Renames `df` columns
      res["df"] = res["df"].rename(
          columns={TIME_COL: "time", VALUE_COL: "value"}
      )
  
      return res
  
file_path: greykite/greykite/detection/common/testing_utils.py
imports: import numpy
  import pandas
  from greykite.common.constants import ANOMALY_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils_anomalies import contaminate_df_with_anomalies
  from greykite.common.viz.timeseries_annotate import plot_lines_markers
  from greykite.detection.detector.ad_utils import get_anomaly_df
label_desc: Use image node_id 3 for calling a global function with example usage: generate_anomaly_data_hourly() and returns: res