from typing import Tuple
from typing import Set


def get_common_and_diff_members(
    obj_a: object, obj_b: object
) -> Tuple[Set[str], Set[str]]:
    """
    Return the commonalities and differences between the two objects public API.

    Parameters
    ----------
    obj_a: object
        Object to find commonalities and difference when compared with obj_b.
    obj_b: object
        Object to find commonalities and difference when compared with obj_a.

    Returns
    -------
    tuple
        A tuple of two sets of strings where the first is the commonalities and second is the differences.
    """
    is_public = lambda name: not (name.startswith('__') or name.startswith('_'))
    obj_a_dir, obj_b_dir = (
        set(filter(is_public, dir(obj_a))),
        set(filter(is_public, dir(obj_b))),
    )
    common_members = obj_a_dir.intersection(obj_b_dir)
    diff_members = obj_a_dir.symmetric_difference(obj_b_dir)
    return (common_members, diff_members)