def METHOD_NAME(img_path, expected_img_klass):
    """Compare an image of one image class to all others.
    The function should make sure that it loads the image with the expected
    class, but failing when given a bad sniff (when the sniff is used)."""
    def check_img(img_path, img_klass, sniff_mode, sniff, expect_success, msg):
        """Embedded function to do the actual checks expected."""
        if sniff_mode == 'no_sniff':
            # Don't pass any sniff--not even "None"
            is_img, new_sniff = img_klass.path_maybe_image(img_path)
        elif sniff_mode in ('empty', 'irrelevant', 'bad_sniff'):
            # Add img_path to binaryblock sniff parameters
            is_img, new_sniff = img_klass.path_maybe_image(img_path, (sniff, img_path))
        else:
            # Pass a sniff, but don't reuse across images.
            is_img, new_sniff = img_klass.path_maybe_image(img_path, sniff)
        if expect_success:
            # Check that the sniff returned is appropriate.
            new_msg = f'{img_klass.__name__} returned sniff==None ({msg})'
            expected_sizeof_hdr = getattr(img_klass.header_class, 'sizeof_hdr', 0)
            current_sizeof_hdr = 0 if new_sniff is None else len(new_sniff[0])
            assert current_sizeof_hdr >= expected_sizeof_hdr, new_msg
            # Check that the image type was recognized.
            new_msg = (
                f'{basename(img_path)} ({msg}) image '
                f"is{'' if is_img else ' not'} "
                f'a {img_klass.__name__} image.'
            )
            assert is_img, new_msg
        if sniff_mode == 'vanilla':
            return new_sniff
        else:
            return sniff
    sizeof_hdr = getattr(expected_img_klass.header_class, 'sizeof_hdr', 0)
    for sniff_mode, sniff in dict(
        vanilla=None,  # use the sniff of the previous item
        no_sniff=None,  # Don't pass a sniff
        none=None,  # pass None as the sniff, should query in fn
        empty=b'',  # pass an empty sniff, should query in fn
        irrelevant=b'a' * (sizeof_hdr - 1),  # A too-small sniff, query
        bad_sniff=b'a' * sizeof_hdr,  # Bad sniff, should fail
    ).items():
        for klass in img_klasses:
            if klass == expected_img_klass:
                # Class will load unless you pass a bad sniff,
                #   or the header ignores the sniff
                expect_success = sniff_mode != 'bad_sniff' or sizeof_hdr == 0
            else:
                expect_success = False  # Not sure the relationships
            # Reuse the sniff... but it will only change for some
            # sniff_mode values.
            msg = f'{expected_img_klass.__name__}/ {sniff_mode}/ {expect_success}'
            sniff = check_img(
                img_path,
                klass,
                sniff_mode=sniff_mode,
                sniff=sniff,
                expect_success=expect_success,
                msg=msg,
            )