Just add the import `from impacket.dpapi import DomainKey`  Didin't check if any other import are needed. Thank for the work.