'Helper for :meth:`build`.  Returns subdomain and path for the
rule that accepts this endpoint, values and method.
:internal:'

def _partial_build(self, endpoint, values, method, append_unknown):

    if (method is None):
        rv = self._partial_build(endpoint, values, self.default_method, append_unknown)
        if (rv is not None):
            return rv
    for rule in self.map._rules_by_endpoint.get(endpoint, ()):
        if rule.suitable_for(values, method):
            rv = rule.build(values, append_unknown)
            if (rv is not None):
                return rv
