

def get_im_version():
    'Return Image Magick version or None if it is unavailable\n    Try invoking ImageMagick\'s "convert".'
    try:
        out = util.command_output([b'identify', b'--version'])
        if ('imagemagick' in out.lower()):
            pattern = '.+ (\\d+)\\.(\\d+)\\.(\\d+).*'
            match = re.search(pattern, out)
            if out:
                return (int(match.group(1)), int(match.group(2)), int(match.group(3)))
            return (0,)
    except (subprocess.CalledProcessError, OSError):
        return None

dataset/ETHPy150Open beetbox/beets/beets/util/artresizer.py get_im_version/VarMisuse@57/124 `match`->`out`