def diag_item_get_length(item):
    """Returns the item length according to the item_type

    :param item: item to look at
    :type item: :class:`SAPDiagItem`

    :return: the item length
    :rtype: ``int``
    """
    diag_item_sizes = {(1): 16, (2): 20, (3): 3, (7): 76, (8): 0, (9): 22,
        (10): 3, (11): 2, (12): 0, (16): item.item_length, (17): item.
        item_length4, (18): item.item_length4, (19): 2, (21): 36}
    return diag_item_sizes[item.item_type]
