Rather than using `ObjectMetadata::add_metadata_to_xml_node` here add `include ObjectMetadata` at the top and then just use `add_metadata_to_xml_node` instead - there are several other modules being pulled in like that already.