def CreateSiteLinksFeed(feed_service):
  """Create a feed for holding upgraded sitelinks.

  Args:
    feed_service: The FeedService instance.

  Returns:
    A dictionary represent a sitelinks feed holding the sitelinks.
  """
  # Create attributes.
  text_attribute = {
      'type': 'STRING',
      'name': 'Link Text',
  }
  url_attribute = {
      'type': 'URL',
      'name': 'Link URL',
  }

  # Create the feed.
  site_links_feed = {
      'name': 'Feed For Sitelinks',
      'attributes': [text_attribute, url_attribute],
      'origin': 'USER'
  }

  # Create operation.
  operation = {
      'operand': site_links_feed,
      'operator': 'ADD'
  }

  # Add the feed.
  saved_feed = feed_service.mutate([operation])[0]['value'][0]

  return {
      'siteLinksFeedId': saved_feed['id'],
      'textFeedAtrributeId': saved_feed['attributes'][0]['id'],
      'urlFeedAttributeId': saved_feed['attributes'][1]['id']
  }