def METHOD_NAME(self, full_tag, labels=None):
    if not labels:
        return
    with tempfile.TemporaryDirectory() as tmp_dir:
        dockerfile = open(tmp_dir + '/' + 'Dockerfile', "w") # pylint: disable=unspecified-encoding, consider-using-with
        dockerfile.write(f'FROM {full_tag}')
        dockerfile.write('\n')
        for key, value in labels.items():
            dockerfile.write(f'LABEL {key}={value}')
            dockerfile.write('\n')
        dockerfile.close()
        result = self.docker_client.images.build(
            path=tmp_dir,
            dockerfile='Dockerfile',
            tag=full_tag,
            rm=True
        )
        logging.info(f"image built with tag:[{full_tag}] success={result}")