code: def scan_lists(self, regex1, regex2, replacement, strip=False):
      list_array = re.findall(regex1, self.text)
      list_array = list(map(int, list_array))
      for ind, item in enumerate(list_array):
          # to avoid IndexError
          # ruby returns nil if index is out of range
          if (
              ind < len(list_array) - 1
              and item + 1 == list_array[ind + 1]
          ):
              self.substitute_found_list_items(
                  regex2, item, strip, replacement
              )
          elif ind > 0:
              if (
                  ((item - 1) == list_array[ind - 1])
                  or ((item == 0) and (list_array[ind - 1] == 9))
                  or ((item == 9) and (list_array[ind - 1] == 0))
              ):
                  self.substitute_found_list_items(
                      regex2, item, strip, replacement
                  )
  
imports: import string
  import re
  from pysbd.utils import Rule, Text
  from functools import partial
label_desc: Use image node_id 11 for calling the ListItemReplacer obj's underlying member method code with example usage: obj.scan_lists(regex1, regex2, replacement, strip) without return types