def get_diagram_arguments(parser, args, w, h, cabinet, num_frames):
    """
	Validate and unpack the arguments added by add_diagram_arguments.
	"""
    if cabinet.num_cabinets == 1 and num_frames == 1:
        focus = 0, 0, slice(0, 3 * w * h)
        dimensions = cabinet.get_dimensions(boards=3 * w * h)
    elif cabinet.num_cabinets == 1:
        focus = 0, slice(0, num_frames)
        dimensions = cabinet.get_dimensions(frames=num_frames)
    else:
        focus = slice(0, cabinet.num_cabinets),
        dimensions = cabinet.get_dimensions()
    aspect_ratio = float(dimensions.x) / float(dimensions.y)
    wire_thickness = args.wire_thickness
    highlights = args.highlight or []
    hide_labels = args.hide_labels
    return aspect_ratio, focus, wire_thickness, highlights, hide_labels
