code: def match_sublist(the_list, to_match):
      """
  
      :param the_list: [1, 2, 3, 4, 5, 6, 1, 2, 4, 5]
      :param to_match:
          [1, 2]
      :return:
          [(0, 1), (6, 7)]
      """
      len_to_match = len(to_match)
      matched_list = list()
      for index in range(len(the_list) - len_to_match + 1):
          if to_match == the_list[index : index + len_to_match]:
              matched_list += [(index, index + len_to_match - 1)]
      return matched_list
  
file_path: DeepKE/src/deepke/name_entity_re/cross/seq2seq/constraint_decoder/constraint_decoder.py
imports: from collections import defaultdict
  import os
  from typing import List
label_desc: Use image node_id 1 for calling a global function with example usage: match_sublist(the_list, to_match) and returns: matched_list