<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_thumbnail(self, mxcurl, width, height, method='scale', allow_remote=True):
 """Download raw media thumbnail from provided mxc URL. Args: mxcurl (str):
 mxc media URL width (int):
 desired thumbnail width height (int):
 desired thumbnail height method (str):
 thumb creation method. Must be in ['scale', 'crop']. Default 'scale'. allow_remote (bool):
 indicates to the server that it should not attempt to fetch the media if it is deemed remote. Defaults to true if not provided. """

        if method not in ['scale', 'crop']:
            raise ValueError(
                "Unsupported thumb method '%s'" % method
            )
        query_params = {
                    "width": width,
                    "height": height,
                    "method": method
                }
        if not allow_remote:
            query_params["allow_remote"] = False
        if mxcurl.startswith('mxc://'):
            return self._send(
                "GET", mxcurl[6:],
                query_params=query_params,
                api_path="/_matrix/media/r0/thumbnail/",
                return_json=False
            )
        else:
            raise ValueError(
                "MXC URL '%s' did not begin with 'mxc://'" % mxcurl
            )