code: def media_download(self, mxcurl, allow_remote=True):
          
          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
              )
docs: 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.