<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def media_download(self, mxcurl, allow_remote=True):
 """Download raw media from provided mxc URL. Args: mxcurl (str):
 mxc media URL. 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. """

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