code: def CreateSitelinkFeedItem(feed_items, feed_item_id):
    
    site_link_from_feed = feed_items[feed_item_id]
    site_link_feed_item = {
        'sitelinkText': site_link_from_feed['text'],
        'sitelinkLine2': site_link_from_feed['line2'],
        'sitelinkLine3': site_link_from_feed['line3'],
    }
  
    if 'finalUrls' in site_link_from_feed and site_link_from_feed['finalUrls']:
      site_link_feed_item['sitelinkFinalUrls'] = {
          'urls': site_link_from_feed['finalUrls']
      }
  
      if 'finalMobileUrls' in site_link_from_feed:
        site_link_feed_item['sitelinkFinalMobileUrls'] = {
            'urls': site_link_from_feed['finalMobileUrls']
        }
  
      site_link_feed_item['sitelinkTrackingUrlTemplate'] = (
          site_link_from_feed['trackingUrlTemplate'])
    else:
      site_link_feed_item['sitelinkUrl'] = site_link_from_feed['url']
  
    return site_link_feed_item
docs: Creates a Sitelink Feed Item.
  
    Args:
      feed_items: a list of all Feed Items.
      feed_item_id: the Id of a specific Feed Item for which a Sitelink Feed Item
          should be created.
  
    Returns:
      The new Sitelink Feed Item.