def extract(self, page, start_index=0, end_index=None,
                ignored_regions=None, **kwargs):
        """
        Find a region surrounding repeated data and run extractors on the data
        in that region.
        """
        start_index = max(0, start_index - 1)
        max_end_index = len(page.token_page_indexes)
        if end_index is None:
            end_index = max_end_index
        else:
            end_index = min(max_end_index, end_index + 1)
        region = Region(*similar_region(
            page.page_tokens, self.template_tokens, self.annotation,
            start_index, end_index, self.best_match, **kwargs))
        if region.score < 1:
            return []
        surrounding = element_from_page_index(page, start_index)
        items = self._extract_items_from_region(
            region, page, ignored_regions, surrounding, **kwargs)
        tag = element_from_page_index(page, region.start_index)
        items = [self._validate_and_adapt_item(i, page, tag) for i in items]
        if self.many:
            return items
        return self._merge_items(items)

        Find a region surrounding repeated data and run extractors on the data
        in that region.
        
slybot/slybot/plugins/scrapely_annotations/extraction/container_extractors.py