<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetch(self, method, params=None):
 """ Fetch an url. """

        # Encode params if they exist
        if params:
            params = urllib.parse.urlencode(params, doseq=True).encode("utf-8")
        content = self._make_request(
            self.BASE_URI + method,
            params,
        )
        # Convert its JSON to a Python dictionary and return
        return json.loads(content.decode("utf-8"))