code: def complies_with_scope(queue_item, new_request, scope):
          
  
          if not URLHelper.is_parsable(queue_item.request.url):
              return False
  
          if not URLHelper.is_parsable(new_request.url):
              return False
  
          if scope.request_methods:
              if not queue_item.request.method in scope.request_methods:
                  return False
  
          if scope.protocol_must_match:
              if URLHelper.get_protocol(queue_item.request.url) != URLHelper.get_protocol(new_request.url):
                  return False
  
          if scope.subdomain_must_match:
              current_subdomain = URLHelper.get_subdomain(queue_item.request.url)
              new_subdomain = URLHelper.get_subdomain(new_request.url)
  
              www_matches = False
  
              if current_subdomain == "www" and new_subdomain == "":
                  www_matches = True
  
              if new_subdomain == "www" and current_subdomain == "":
                  www_matches = True
  
              if not www_matches and current_subdomain != new_subdomain:
                  return False
  
          if scope.hostname_must_match:
              if URLHelper.get_hostname(queue_item.request.url) != URLHelper.get_hostname(new_request.url):
                  return False
  
          if scope.tld_must_match:
              if URLHelper.get_tld(queue_item.request.url) != URLHelper.get_tld(new_request.url):
                  return False
  
          return True
docs: Check if the new request complies with the crawling scope.
  
          Args:
              queue_item (:class:`nyawc.QueueItem`): The parent queue item of the new request.
              new_request (:class:`nyawc.http.Request`): The request to check.
              scope (:class:`nyawc.Options.OptionsScope`): The scope to check.
  
          Returns:
              bool: True if it complies, False otherwise.