docs: def mkpath(self, url, path, filename=None, gzip=False):
          """
          Assembles various components to form a complete resource URL.
          
          args:
            url: (str) A base media URL.
            path: (str) The path on the host (specified in 'url') leading up
                        to the file.
            filename: (str) The file name to serve.
            gzip: (bool) True if client should receive *.gzt version of file.
          """
          if path:
              url = "%s/%s" % (url.rstrip('/'), path.strip('/'))
  
          if filename:
              url = "%s/%s" % (url, filename.lstrip('/'))
          
          content_type = mimetypes.guess_type(url)[0]
          if gzip and content_type in mediasync.TYPES_TO_COMPRESS:
              url = "%s.gzt" % url
  
          cb = msettings['CACHE_BUSTER']
          if cb:
              # Cache busters help tell the client to re-download the file after
              # a change. This can either be a callable or a constant defined
              # in settings.py.
              cb_val = cb(url) if callable(cb) else cb
              url = "%s?%s" % (url, cb_val)
  
          return msettings['URL_PROCESSOR'](url)