code: def seperate_end_page_links(stream_data):
      '''
      Seperate out page blocks at the end of a StreamField.
  
      Accepts: List of streamfield blocks
      Returns: Tuple of 2 lists of blocks - (remaining body, final article)
      '''
      stream_data_copy = list(stream_data)
      end_page_links = []
  
      for block in stream_data_copy[::-1]:
          if block['type'] == 'page':
              end_page_links.insert(0, block)
              stream_data_copy.pop()
          else:
              break
  
      return (stream_data_copy, end_page_linksf seperate_end_page_links(stream_data):
      '''
      Seperate out page blocks at the end of a StreamField.
  
      Accepts: List of streamfield blocks
      Returns: Tuple of 2 lists of blocks - (remaining body, final article)
      '''
      stream_data_copy = list(stream_data)
      end_page_links = []
  
      for block in stream_data_copy[::-1]:
          if block['type'] == 'page':
              end_page_links.insert(0, block)
              stream_data_copy.pop()
          else:
              break
  
      return (stream_data_copy, end_page_links)
docs: Seperate out page blocks at the end of a StreamField.
  
      Accepts: List of streamfield blocks
      Returns: Tuple of 2 lists of blocks - (remaining body, final article)