def is_valid_network_response_code(self, code: int, task: Task) -> bool:
        """Test if response is valid.

        Valid response is handled with associated task handler.
        Failed respoosne is processed with error handler.
        """
        return (
            code < HTTP_STATUS_ERROR
            or code == HTTP_STATUS_NOT_FOUND
            or code in task.valid_status
        )
Test if response is valid.

        Valid response is handled with associated task handler.
        Failed respoosne is processed with error handler.
        
grab/spider/base.py