def _get_key_mapping(self, metadata, key, is_regular_key):
        mapping_to = key
        if is_regular_key:
            try:
                mapping_to = metadata['_self']['mapping_to']
            except Exception:
                mapping_to = None

        return mapping_to
Creates a ``JarTask.JarBuilder`` ready for use.
dataset/ETHPy150Open openstack/compass-core/compass/deployment/installers/installer.py/BaseInstaller._get_key_mapping--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/backend/jvm/tasks/jar_task.py/JarBuilderTask.create_jar_builder