code: def get_urls_per_shard(urls_files):
      total_urls = 0
      per_shard = {}
      for urls_file in urls_files:
          ref_urls = set()
          shard_id = int(os.path.basename(urls_file)[15:20])
          with tf.gfile.Open(urls_file) as f:
              wiki_urls = json.loads(f.read())
          for _, wiki_info in wiki_urls.items():
              ref_urls |= set(wiki_info["refs"])
  
          per_shard[shard_id] = list(ref_urls)
          total_urls += len(ref_urls)
      return per_shard, total_urls
  
imports: import datetime
  import json
  import math
  import multiprocessing
  import os
  import random
  import asyncio
  import aiohttp
  import tensorflow
  from tensor2tensor.data_generators.wikisum import html
  from tensor2tensor.data_generators.wikisum import utils
label_desc: Use image node_id 9 for calling a global function with example usage: get_urls_per_shard(urls_files) and returns: per_shard,  total_urls