def parse(self, img_info_output):
        """Returns dictionary based on human-readable output from
        `qemu-img info`

        Known problem: breaks if path contains opening parenthesis `(` or
        colon `:`"""
        result = {}
        for l in img_info_output.split('\n'):
            if not l.strip():
                continue
            try:
                name, value = l.split(':', 1)
            except __HOLE__:
                continue
            name = name.strip()
            if name == 'backing file':
                file_end = value.find('(')
                if file_end == -1:
                    file_end = len(value)
                result['backing-filename'] = value[:file_end].strip()
            elif name == 'file format':
                result['format'] = value.strip()
        return result
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/utils/qemu_img.py/TextQemuImgInfoParser.parse