Called per artist (group), with possibly a list of indices.
162270
def onpick(self, event):
        """"""
        if hasattr(event.artist, '_mt_legend_item'):
            # legend item, instead of data point
            idx = event.artist._mt_legend_item
            try:
                self.toggle_artist(self.artists[idx])
            except IndexError:
                pass
            return

        # only print logevents of visible points
        if not event.artist.get_visible():
            return

        # get PlotType and let it print that event
        plot_type = event.artist._mt_plot_type
        plot_type.clicked(event)
1311439
def get_artist_by_mbid(self, mbid):
        """"""

        params = {"mbid": mbid}

        doc = _Request(self, "artist.getInfo", params).execute(True)

        return Artist(_extract(doc, "name"), self)
318277
def get_artist(self):
        
        # pylint: disable=E1101
        assert isinstance(self, (Album, Track))
        return self.client.get_artist(self.artist.id)
569807
def set_artist(self, artist):
        
        self._set_attr(TPE1(encoding=3, text=artist.decode('utf-8')))
99078
def scanimage_artist_metadata(artist):
    """"""
    try:
        return json.loads(artist)
    except ValueError as exc:
        log.warning('scanimage_artist_metadata: %s: %s',
                    exc.__class__.__name__, exc)
1158369
private int indicesFront(int[] entries) {
    int start = 0;
    for (int i = 0; i < entries.length; i++) {
      start *= numClasses;
      start += entries[i];
    }
    int offset = SloppyMath.intPow(numClasses, windowSize - entries.length);
    start *= offset;
    return start;
  }
1149601
def extract_listing(pid):
    """"""
    print("Extracting tracklisting...")
    listing_etree = open_listing_page(pid + '/segments.inc')
    track_divs = listing_etree.xpath('//div[@class="segment__track"]')

    listing = []
    for track_div in track_divs:
        try:
            artist_names = track_div.xpath('.//span[@property="byArtist"]'
                                           '//span[@class="artist"]/text()')
        except ValueError:
            artist_names = ['']

        if not artist_names:
            artist_names = ['']

        if len(artist_names) > 1:
            artists = ', '.join(artist_names[:-1]) + ' & ' + artist_names[-1]
        else:
            artists = artist_names[0]

        try:
            title, = track_div.xpath('.//p/span[@property="name"]/text()')
        except ValueError:
            title = ''

        try:
            label, = track_div.xpath('.//abbr[@title="Record Label"]'
                                     '/span[@property="name"]/text()')
        except ValueError:
            label = ''
        listing.append((artists, title, label))
    return listing
679133
def artist_infos(self, artist_id):
        
        action = uri + '/artist/' + str(artist_id)
        data = self.request('GET', action)
        return data
826083
def get_artist_songs(self, id_, sort='title', per_page=20, page=1):
        """"""
        endpoint = "artists/{id}/songs".format(id=id_)
        params = {'sort': sort, 'per_page': per_page, 'page': page}
        return self._make_request(endpoint, params_=params)
889114
private void updateArtworkType(List<Artwork> artworkList, ArtworkType type) {
        for (Artwork artwork : artworkList) {
            artwork.setArtworkType(type);
        }
    }
981976
def getTracksForArtist(artist,appears_on=nil,start=nil,count=nil,extras=nil)
      method = 'getTracksForArtist'
      type = Track
      args = {:artist=>artist}
      args[:appears_on] = appears_on if appears_on
      args[:start] = start if start
      args[:count] = count if count
      args[:extras] = extras if extras
      return_object type,method,args
    end
784299
def hidden_indices(self):
        """"""
        return tuple(sorted(set(self.micro_indices) -
                            set(self.output_indices)))
151133
def getAlbumsForArtistInCollection(artist,user=nil,extras=nil)
      method = 'getAlbumsForArtistInCollection'
      type = Album
      args = {:artist=>artist}
      args[:user] = user if user
      args[:extras] = extras if extras
      auth = !!user
      return_object type,method,args,auth
    end
438272
def artist_to_ref(artist):
    """"""
    if artist.name:
        name = artist.name
    else:
        name = 'Unknown artist'
    return Ref.directory(uri=artist.uri, name=name)
445422
def create_index_tuple(group_ids):
    """"""
    max_group_id = np.max(group_ids)

    start_idx_arr = np.full(max_group_id + 1, 0)
    n_items_arr = np.full(max_group_id + 1, 0)

    current_group_id = group_ids[0]
    current_idx = 0
    item_count = 0

    for group_id in group_ids:
        if group_id != current_group_id:
            start_idx_arr[current_group_id] = current_idx
            n_items_arr[current_group_id] = item_count
            current_idx += item_count
            item_count = 0
            current_group_id = group_id
        item_count += 1
    else:
        start_idx_arr[current_group_id] = current_idx
        n_items_arr[current_group_id] = item_count

    return (start_idx_arr, n_items_arr)
401034
def export(self):
        
        return {'id' : self.id, 'name' : self.name, 'artist' : self._artist_name, 'artist_id' : self._artist_id, 'cover' : self._cover_url}
1165159
def multiplicity(keys, axis=semantics.axis_default):
    
    index = as_index(keys, axis)
    return index.count[index.inverse]