def parents_tagged_to_same_mainstream_browse_page
      return [] unless content_item.parent && content_item.parent.parent

      common_parent_content_ids = tagged_to_same_mainstream_browse_page.map(&:content_id)

      @parents_tagged_to_same_mainstream_browse_page ||= content_item.related_links.select do |related_item|
        next if common_parent_content_ids.include?(related_item.content_id)
        related_item.mainstream_browse_pages.map(&:parent).map(&:content_id).include?(content_item.parent.parent.content_id)
      end
    end
def parents_tagged_to_same_mainstream_browse_page
      return [] unless content_item.parent && content_item.parent.parent

      common_parent_content_ids = tagged_to_same_mainstream_browse_page.map(&:content_id)

      @parents_tagged_to_same_mainstream_browse_page ||= content_item.related_links.select do |related_item|
        next if common_parent_content_ids.include?(related_item.content_id)
        related_item.mainstream_browse_pages.map(&:parent).map(&:content_id).include?(content_item.parent.parent.content_id)
      end
    end
This will return related items whose parents are tagged to the same mainstream
 browse page as the main content item's parent.