convert "grViz" , "htmlwidget" class to "dm" class for dm package

Hello All,
I'm using dm package to create the ER. After add PK and FK, the my_dm_key is not dm class. It becomes "grViz" "htmlwidget".

I want to convert "grViz" "htmlwidget" to "dm" in order to draw plot. Do you know how to do this?

Thanks,
Kai

class(my_dm_keys)
[1] "grViz" "htmlwidget"
my_dm_keys <- as_dm(my_dm_keys)
Error in as_dm():
! Can't coerce to .
Run rlang::last_error() to see where the error occurred.