code: def find_min_max_of_block(indices: List[int]):
      """Given a list of indices, with some of them being consecutive,
      find the start and end of each block.
      Indices are considered to be in the same block if they are consecutive numbers.
      For example, [1, 4, 5, 6, 12, 14, 15] will give [[1, 1], [4, 6], [12, 12], [14, 15]].
  
      Parameters
      ----------
      indices: `list`
          List of indices in ascending order.
          Example: [1, 4, 5, 6, 12, 14, 15].
  
      Returns
      ----------
          index_blocks : `list`
          List of list with start and end index of each block.
          Example: [[1, 1], [4, 6], [12, 12], [14, 15]].
      """
      if not indices:
          return []
      block_start_i = 0
      index_blocks = []
      for i in range(1, len(indices)):
          if indices[i] - indices[i - 1] != 1:
              index_blocks.append(
                  (indices[block_start_i], indices[i - 1])
              )
              block_start_i = i
      index_blocks.append((indices[block_start_i], indices[-1]))
      return index_blocks
  
file_path: greykite/greykite/algo/changepoint/shift_detection/shift_detector.py
imports: import re
  import warnings
  from datetime import datetime
  from enum import Enum
  from typing import List
  from typing import Optional
  import pandas
  from greykite.common.constants import LEVELSHIFT_COL_PREFIX_SHORT
  from greykite.common.viz.timeseries_plotting import plot_multivariate
label_desc: Use image node_id 1 for calling a global function with example usage: find_min_max_of_block(indices) and returns: index_blocks, list