code: def normalize_url(url):
      
      if url.endswith('.json'):
          url = url[:-5]
      if url.endswith('/'):
          url = url[:-1]
      return url
docs: Return url after stripping trailing .json and trailing slashes.