code: def prune_urls(url_set, start_url, allowed_list, ignored_list):
      
      result = set()
  
      for url in url_set:
          allowed = False
          for allow_url in allowed_list:
              if url.startswith(allow_url):
                  allowed = True
                  break
  
          if not allowed:
              continue
  
          ignored = False
          for ignore_url in ignored_list:
              if url.startswith(ignore_url):
                  ignored = True
                  break
  
          if ignored:
              continue
  
          prefix, suffix = (url.rsplit('.', 1) + [''])[:2]
          if suffix.lower() in IGNORE_SUFFIXES:
              continue
  
          result.add(url)
  
      return result
docs: Prunes URLs that should be ignored.