def METHOD_NAME(instance, levels=2) -> Optional[ColumnSizes]:
    num_levels = 0
    current_instance = instance
    has_container = False
    while num_levels < levels:
        parent = current_instance.parent
        if not parent:
            break
        if "container" in parent.plugin_type.lower():
            has_container = True
        elif parent.plugin_type == "GridColumnPlugin":
            parent_model, _parent_instance = parent.get_plugin_instance()
            return {
                name: parent_model.config.get("{}_col".format(name))
                for name, _, _ in BS_BREAKPOINTS
                if parent_model.config.get("{}_col".format(name))
            }
        num_levels += 1
        current_instance = parent
    if has_container:
        return {name: COL_BASE for name, _, _ in BS_BREAKPOINTS}
    return None