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())))

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 ( ) ) ) )
override nodes attributes from metadata node mapping .