def multilayer_getattr(obj, name: str):
    """Like getattr, except `name` can have dots in it."""
    attr_names = name.split(".")
    attr = obj
    for attr_name in attr_names:
        attr = getattr(attr, attr_name)
    return attr