@staticmethod
    def _normalize_uri(uri):
        if uri.startswith('spotify:'):
            return uri
        parsed = urlparse(uri)
        if parsed.netloc not in ('open.spotify.com', 'play.spotify.com'):
            return uri
        return 'spotify%s' % parsed.path.strip().replace('/', ':')
dataset/ETHPy150Open mopidy/pyspotify/spotify/link.py/Link._normalize_uri/original