<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_http_url(url, req, method='GET'):
 """ Add a query part representing the request to a url that may already contain a query part. Only done if the HTTP method used is 'GET' or 'DELETE'. :param url: The URL :param req: The request as a :py:class:`oidcmsg.message.Message` instance :param method: The HTTP method :return: A possibly modified URL """

    if method in ["GET", "DELETE"]:
        if req.keys():
            _req = req.copy()
            comp = urlsplit(str(url))
            if comp.query:
                _req.update(parse_qs(comp.query))

            _query = str(_req.to_urlencoded())
            return urlunsplit((comp.scheme, comp.netloc, comp.path,
                               _query, comp.fragment))
        else:
            return url
    else:
        return url