<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(url, params={}):
 """Invoke an HTTP GET request on a url Args: url (string):
 URL endpoint to request params (dict):
 Dictionary of url parameters Returns: dict: JSON response as a dictionary """

        request_url = url

        if len(params):
            request_url = "{}?{}".format(url, urlencode(params))

        try:
            req = Request(request_url, headers={'User-Agent': 'Mozilla/5.0'})
            response = json.loads(urlopen(req).read().decode("utf-8"))

            return response
        except HTTPError as err:
            raise MtgException(err.read())