def get_artifact_metadata(self, remote_artifact):
        """
        Gets artifact's maven metadata.

        Metadata capability needs to be enabled to use this. Also indexing has to be enabled for that repo to make it
        work.

        :param remote_artifact:
        :return:
        """
        artifact_id = 'urn:maven/artifact#{coordinates}'.format(coordinates=remote_artifact.get_coordinates_string())
        logger.debug('artifact_id: %s', artifact_id)
        artifact_id_encoded = base64.b64encode(artifact_id)
        metadata_raw = self._send_json('service/local/index/custom_metadata/{repo_id}/{artifact_id_encoded}'.format(
            repo_id=remote_artifact.repo_id, artifact_id_encoded=artifact_id_encoded))

        metadata = {}

        for d in metadata_raw['data']:
            try:
                metadata[d["key"]] = d["value"]
            except __HOLE__:
                raise RepositoryClientError('Malformed artifact metadata. Missing key or value at artifact {atrifact}'.format(
                    artifact=remote_artifact
                ))

        return metadata
dataset/ETHPy150Open stardust85/repositorytools/repositorytools/lib/repository.py/NexusProRepositoryClient.get_artifact_metadata