<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search_artists_by_name(self, artist_name: str, limit: int = 5) -> List[NameExternalIDPair]: """ Returns zero or more artist name - external ID pairs that match the specified artist name. Arguments: artist_name (str):
 The artist name to search in the Spotify API. limit (int):
 The maximum number of results to return. Returns: Zero or more artist name - external ID pairs. Raises: requests.HTTPError: If an HTTP error occurred during the request. SpotifyClientError: If an invalid item is found. """

        response: requests.Response = requests.get(
            self._API_URL_TEMPLATE.format("search"),
            params={"q": artist_name, "type": "artist", "limit": limit},
            headers={"Authorization": "Bearer {}".format(self._token.access_token)}
        )

        # TODO: handle API rate limiting

        response.raise_for_status()
        if not response.text:
            return []

        result: List[NameExternalIDPair] = []
        data: List[Dict] = response.json()["artists"]["items"]
        for artist in data:
            artist = NameExternalIDPair(artist["name"].strip(), artist["id"].strip())
            if not artist.name or not artist.external_id:
                raise SpotifyClientError("Name or ID is missing")
            result.append(artist)

        return result