def METHOD_NAME(obj: Any, name: str, default=NoDefaultProvided) -> Any:
    """
    Same as getattr(), but allows dot notation lookup e.g. getattrd(obj, "a.b")
    Raises: AttributeError if ``name`` is not found and ``default`` is not given.
    Discussed in: http://stackoverflow.com/questions/11975781
    """
    from functools import reduce
    try:
        return reduce(getattr, name.split("."), obj)
    except AttributeError:
        if default is not NoDefaultProvided:
            return default
        raise