def code_to_category(code):
    """Return a Status' category as a str or 'Unknown' if not recognised.

    References
    ----------
    DICOM Standard Part 7, Annex C
    DICOM Standard Part 4
    """
    # pylint: disable=too-many-return-statements
    if isinstance(code, int) and code >= 0:
        if code == 0x0000:
            return 'Success'
        elif code in [0xFF00, 0xFF01]:
            return 'Pending'
        elif code == 0xFE00:
            return 'Cancel'
        elif code in [0x0105, 0x0106, 0x0110, 0x0111, 0x0112, 0x0113, 0x0114,
                      0x0115, 0x0117, 0x0118, 0x0119, 0x0120, 0x0121, 0x0122,
                      0x0123, 0x0124, 0x0210, 0x0211, 0x0212, 0x0213]:
            return 'Failure'
        elif code in range(0xA000, 0xB000):
            return 'Failure'
        elif code in range(0xC000, 0xD000):
            return 'Failure'
        elif code in [0x0107, 0x0116]:
            return 'Warning'
        elif code in range(0xB000, 0xC000):
            return 'Warning'
        elif code == 0x0001:
            return 'Warning'

        return 'Unknown'
    else:
        raise ValueError("'code' must be a positive integer.")