code: def test_generate_anomaly_blocks():
      res = generate_anomaly_blocks(
          timeseries_length=100, block_number=5, mean_block_size=5
      )
      assert len(res["anomaly_block_list"]) == res["block_number"]
      assert res["anomaly_block_list"][-1][-1] <= 100
  
file_path: greykite/greykite/tests/common/test_testing_utils_anomalies.py
imports: import datetime
  import numpy
  import pandas
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils_anomalies import calc_quantiles_simulated_df
  from greykite.common.testing_utils_anomalies import contaminate_df_with_anomalies
  from greykite.common.testing_utils_anomalies import generate_anomaly_blocks
  from greykite.common.testing_utils_anomalies import generate_df_with_anomalies_sim_based
label_desc: Use image node_id 1 for calling a global function with example usage: test_generate_anomaly_blocks() without return types