'Take a list of AssetMetadata objects. Add them all to the node.
The node should already be created as a top-level "assets" element.'

@staticmethod
@contract(node='AssetsElement', assets=list)
def add_all_assets_as_xml(node, assets):

    for asset in assets:
        asset_node = etree.SubElement(node, 'asset')
        asset.to_xml(asset_node)
