def _inject_releases_internal(self, meta, parent, metadata):
        releases = self._group_releases(metadata, 'releaseids' in meta)
        parent['releases'] = []
        for release, release_metadata in releases:
            parent['releases'].append(release)
            if 'tracks' in meta:
                release['mediums'] = list(self._group_tracks(release_metadata))
                if 'compress' in meta:
                    for medium in release['mediums']:
                        for track in medium['tracks']:
                            if 'artists' in track and track['artists'] == release.get('artists'):
                                del track['artists']
dataset/ETHPy150Open lalinsky/acoustid-server/acoustid/api/v2/__init__.py/LookupHandler._inject_releases_internal/original