def METHOD_NAME(
    value: typing.Set, type_: typing.Type
) -> SummaryOutput:
    """
    Summary for the UI
    """
    complete_summary, blobs = [], []
    element_type = typing.get_args(type_)[0]
    for item in value:
        item_summary, item_blob = get_json_encodable_summary(item, element_type)
        complete_summary.append(item_summary)
        blobs.append(item_blob)
    max_item = 0
    if len(complete_summary) > 0:
        # this logic doesn't account for the "length" and "summary"
        # keys or outer wrapping brackets, but those represent roughly
        # 1 thousandth of the payload in the max case, and thus can
        # be ignored
        max_element_byte_len = max(
            len(json.dumps(element).encode("utf8")) for element in complete_summary
        )
        max_element_byte_len += 2
        max_elements = int(MAX_SUMMARY_BYTES / max_element_byte_len)
        max_item = max(
            max_elements, 1
        )  # ensure there's always at least 1 element for non-empty lists
    blobs_dict = {}
    for item_blobs in blobs[:max_item]:
        blobs_dict.update(item_blobs)
    return {
        "length": len(value),
        "summary": complete_summary[:max_item],
    }, blobs_dict