def _enable_custom_widget_manager(package_name: str) -> str:
    """Return additional finally block for packages that require a custom widget manager."""
    if any([requires_custom_widget_manager in package_name for requires_custom_widget_manager in (
            "itkwidgets", )]):
        return "\n" + """finally:
    import google.colab
    google.colab.output.enable_custom_widget_manager()"""
    else:
        return ""