<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __getRefererUrl(self, url=None):
 """ gets the referer url for the token handler """

        if url is None:
            url = "http://www.arcgis.com/sharing/rest/portals/self"
        params = {
            "f" : "json",
            "token" : self.token
        }
        val = self._get(url=url, param_dict=params,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)
        self._referer_url = "arcgis.com"#"http://%s.%s" % (val['urlKey'], val['customBaseUrl'])
        self._token = None
        return self._referer_url