def _inject_release_groups_internal(self, meta, parent, metadata):
        release_groups = self._group_release_groups(metadata, 'releasegroupids' in meta)
        parent['releasegroups'] = []
        for release_group, release_group_metadata in release_groups:
            parent['releasegroups'].append(release_group)
            if 'releases' in meta or 'releaseids' in meta:
                self._inject_releases_internal(meta, release_group, release_group_metadata)
                if 'compress' in meta:
                    for release in release_group['releases']:
                        if 'artists' in release and release['artists'] == release_group.get('artists'):
                            del release['artists']
                        if 'title' in release and release['title'] == release_group.get('title'):
                            del release['title']
dataset/ETHPy150Open lalinsky/acoustid-server/acoustid/api/v2/__init__.py/LookupHandler._inject_release_groups_internal/original