def tangent_only_intersections(all_types):
    """Determine intersection in the case of only-tangent intersections.

    If the only intersections are tangencies, then either the surfaces
    are tangent but don't meet ("kissing" edges) or one surface is
    internally tangent to the other.

    Thus we expect every intersection to be classified as
    :attr:`~.IntersectionClassification.TANGENT_FIRST`,
    :attr:`~.IntersectionClassification.TANGENT_SECOND`,
    :attr:`~.IntersectionClassification.OPPOSED`,
    :attr:`~.IntersectionClassification.IGNORED_CORNER` or
    :attr:`~.IntersectionClassification.COINCIDENT_UNUSED`.

    What's more, we expect all intersections to be classified the same for
    a given pairing.

    Args:
        all_types (Set[.IntersectionClassification]): The set of all
            intersection classifications encountered among the intersections
            for the given surface-surface pair.

    Returns:
        Tuple[Optional[list], Optional[bool]]: Pair (2-tuple) of

        * Edges info list; will be empty or :data:`None`
        * "Contained" boolean. If not :data:`None`, indicates
          that one of the surfaces is contained in the other.

    Raises:
        ValueError: If there are intersections of more than one type among
            :attr:`~.IntersectionClassification.TANGENT_FIRST`,
            :attr:`~.IntersectionClassification.TANGENT_SECOND`,
            :attr:`~.IntersectionClassification.OPPOSED`,
            :attr:`~.IntersectionClassification.IGNORED_CORNER` or
            :attr:`~.IntersectionClassification.COINCIDENT_UNUSED`.
        ValueError: If there is a unique classification, but it isn't one
            of the tangent types.
    """
    if len(all_types) != 1:
        raise ValueError("Unexpected value, types should all match", all_types)

    point_type = all_types.pop()
    if point_type == CLASSIFICATION_T.OPPOSED:
        return [], None

    elif point_type == CLASSIFICATION_T.IGNORED_CORNER:
        return [], None

    elif point_type == CLASSIFICATION_T.TANGENT_FIRST:
        return None, True

    elif point_type == CLASSIFICATION_T.TANGENT_SECOND:
        return None, False

    elif point_type == CLASSIFICATION_T.COINCIDENT_UNUSED:
        return [], None

    else:
        raise ValueError("Point type not for tangency", point_type)
Determine intersection in the case of only-tangent intersections.

    If the only intersections are tangencies, then either the surfaces
    are tangent but don't meet ("kissing" edges) or one surface is
    internally tangent to the other.

    Thus we expect every intersection to be classified as
    :attr:`~.IntersectionClassification.TANGENT_FIRST`,
    :attr:`~.IntersectionClassification.TANGENT_SECOND`,
    :attr:`~.IntersectionClassification.OPPOSED`,
    :attr:`~.IntersectionClassification.IGNORED_CORNER` or
    :attr:`~.IntersectionClassification.COINCIDENT_UNUSED`.

    What's more, we expect all intersections to be classified the same for
    a given pairing.

    Args:
        all_types (Set[.IntersectionClassification]): The set of all
            intersection classifications encountered among the intersections
            for the given surface-surface pair.

    Returns:
        Tuple[Optional[list], Optional[bool]]: Pair (2-tuple) of

        * Edges info list; will be empty or :data:`None`
        * "Contained" boolean. If not :data:`None`, indicates
          that one of the surfaces is contained in the other.

    Raises:
        ValueError: If there are intersections of more than one type among
            :attr:`~.IntersectionClassification.TANGENT_FIRST`,
            :attr:`~.IntersectionClassification.TANGENT_SECOND`,
            :attr:`~.IntersectionClassification.OPPOSED`,
            :attr:`~.IntersectionClassification.IGNORED_CORNER` or
            :attr:`~.IntersectionClassification.COINCIDENT_UNUSED`.
        ValueError: If there is a unique classification, but it isn't one
            of the tangent types.