code: def exchange_reference(root_url, service, version):
      
      root_url = root_url.rstrip('/')
      if root_url == OLD_ROOT_URL:
          return 'https://references.taskcluster.net/{}/{}/exchanges.json'.format(service, version)
      else:
          return '{}/references/{}/{}/exchanges.json'.format(root_url, service, version)
docs: Generate URL for a Taskcluster exchange reference.