def clone_plugin_data(dashboard_entry, request=None):
    """Clone plugin data of a dashboard entry."""
    if dashboard_entry:
        plugin = dashboard_entry.get_plugin(request=request)
        if plugin:
            plugin_data = plugin._clone_plugin_data(dashboard_entry)
            if plugin_data is None:
                plugin_data = dashboard_entry.plugin_data
            return plugin_data
