def get_member(obj, dotted, default=None):
    """
    Return member or member of a member of the object specified.
    :param obj: object to get member from.
    :param dotted: dotted string representing the member or member of a member.
    :param default: any object.
    :return: whatever the method returns or default if non-existent.
    """
    if dotted:
        parts = dotted.split('.')
        sub_objects = parts[:-1]
        for p in sub_objects:
            if obj:
                obj = getattr(obj, p, None)
            else:
                break
        if obj:
            cmd = parts[len(parts)-1]
            member = getattr(obj, cmd, None)
            return member
    return default