code: def top_level(url, fix_protocol=True):
      
      ext = tld.get_tld(url, fix_protocol=fix_protocol)
      toplevel = '.'.join(urlparse(url).netloc.split('.')[-2:]).split(
          ext)[0] + ext
      return toplevel
docs: Extract the top level domain from an URL.