Return ``True`` if `convert` can be run and reports supporting image format `fmt`.

def check_imagemagick_supported_format(fmt):
    """
    Return ``True`` if `convert` can be run and reports supporting image format `fmt`.
    """
    try:
        convert_output = check_output(['convert', '--version'])
    # `subprocess` raises `OSError` if the executable is not found
    except (CalledProcessError, OSError) as err:
        logger.error(
            "Cannot run ImageMgick's `convert` program."
            " On Debian/Ubuntu, use `sudo apt-get install imagemagick`"
            " to install it.")
        return False
    # example `convert --version` output::
    #
    #     $ convert --version
    #     Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
    #     Copyright: (c) 1999-2017 ImageMagick Studio LLC
    #     License: http://www.imagemagick.org/script/license.php
    #     Features: Cipher DPC Modules OpenMP
    #     Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
    #
    # the following loop will make it such that::
    #
    #     supported = ['bzlib', 'djvu', ...]
    #
    supported = []
    for line in convert_output.split('\n'):
        line = line.lower()
        if line.startswith('delegates'):
            supported += line.split(':', 1)[1].split()
    # allow fmt to be ``png``, ``JPEG``, ``.TIF`` etc.
    fmt = fmt.lower()
    if not fmt.startswith('.'):
        fmt = '.' + fmt
    try:
        delegate = SUPPORTED_IMAGE_FORMATS[fmt]
    except KeyError:
        logger.error("Image format `%s` not supported by `tm_client`.")
        return False
    if delegate in supported:
        return True
    else:
        logger.error("Image format `%s` not in ImageMagick's `convert` delegates.")
        return False