human
Complete this python program:
def imagej_description_dict(description):
assistant
#Here is the Python program you requested.

    """Return dictionary from ImageJ image description byte string.
    Raise ValueError if not a valid ImageJ description.
    >>> description = b\ImageJ=1.11a\nimages=510\nhyperstack=true\n\
    >>> imagej_description_dict(description)  # doctest: +SKIP
    {\ImageJ\: \1.11a\, \images\: 510, \hyperstack\: True}
    """
    def _bool(val):
        return {'true': True, 'false': False}[val.lower()]
    _str = (str if (sys.version_info[0] < 3) else (lambda x: str(x, 'cp1252')))
    result = {}
    for line in description.splitlines():
        try:
            (key, val) = line.split('=')
        except Exception:
            continue
        key = key.strip()
        val = val.strip()
        for dtype in (int, float, _bool, _str):
            try:
                val = dtype(val)
                break
            except Exception:
                pass
        result[_str(key)] = val
    if ('ImageJ' not in result):
        raise ValueError('not    a    ImageJ    image    description')
    return result