<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def href_for(self, operation, qs=None, **kwargs):
 """ Construct an full href for an operation against a resource. :parm qs: the query string dictionary, if any :param kwargs: additional arguments for path expansion """

        url = urljoin(request.url_root, self.url_for(operation, **kwargs))
        qs_character = "?" if url.find("?") == -1 else "&"

        return "{}{}".format(
            url,
            "{}{}".format(qs_character, urlencode(qs)) if qs else "",
        )