code: def alter(node, metadata):
      
      if node is not None and metadata and 'node' in metadata:
          node.attrib.update(
              dict((k, str(v)) for k, v in metadata['node'].items())
          )
docs: Override nodes attributes from metadata node mapping