code: def hbreak(image, mask=None, iterations=1):
      '''Remove horizontal breaks
      
      1 1 1     1 1 1
      0 1 0 ->  0 0 0 (this case only)
      1 1 1     1 1 1
      '''
      global hbreak_table
      if mask is None:
          masked_image = image
      else:
          masked_image = image.astype(bool).copy()
          masked_image[~mask] = False
      result = table_lookup(masked_image, hbreak_table, False)
      if not mask is None:
          result[~mask] = image[~mask]
      return resulf hbreak(image, mask=None, iterations=1):
      '''Remove horizontal breaks
      
      1 1 1     1 1 1
      0 1 0 ->  0 0 0 (this case only)
      1 1 1     1 1 1
      '''
      global hbreak_table
      if mask is None:
          masked_image = image
      else:
          masked_image = image.astype(bool).copy()
          masked_image[~mask] = False
      result = table_lookup(masked_image, hbreak_table, False)
      if not mask is None:
          result[~mask] = image[~mask]
      return result
docs: Remove horizontal breaks
      
      1 1 1     1 1 1
      0 1 0 ->  0 0 0 (this case only)
      1 1 1     1 1 1