def METHOD_NAME(
    field: Field,
    hidden_fields_field_ids_filter: Optional[Iterable[int]] = None,
) -> List[Tuple[View, Set[int]]]:
    """
    Finds all views where field is visible and also attaches the set of fields which
    are hidden in said view.
    :param field: All views where this field is visible will be returned.
    :param hidden_fields_field_ids_filter: An optional filter which restricts the
        calculation of whether a field is hidden or not in a returned view down to just
        checking the fields in this iterable.
    :return: A list of tuples where the first value is a view where field is visible
        and the second is the set of field ids which are hidden in said view.
    """
    views_where_field_was_visible = []
    for view in specific_iterator(
        field.table.view_set.filter(public=True).prefetch_related("table__field_set"),
        per_content_type_queryset_hook=(
            lambda model, queryset: view_type_registry.get_by_model(
                model
            ).enhance_queryset(queryset)
        ),
    ):
        view = view.specific
        view_type = view_type_registry.get_by_model(view)
        if not view_type.when_shared_publicly_requires_realtime_events:
            continue
        if hidden_fields_field_ids_filter is None:
            restrict_hidden_check_to_field_ids = None
        else:
            restrict_hidden_check_to_field_ids = [
                field.id,
                *hidden_fields_field_ids_filter,
            ]
        hidden_field_ids = view_type.get_hidden_fields(
            view, restrict_hidden_check_to_field_ids
        )
        if field.id not in hidden_field_ids:
            views_where_field_was_visible.append((view, hidden_field_ids))
    return views_where_field_was_visible