def getEvaluatedDictionaryByCopyKeys(copyKeys, elementNode):
 evaluatedDictionary = {}
 for key in elementNode.attributes.keys():
  if (key in copyKeys):
   evaluatedDictionary[key] = elementNode.attributes[key]
  else:
   addValueToEvaluatedDictionary(elementNode, evaluatedDictionary, key)
 return evaluatedDictionary

def getEvaluatedDictionaryByCopyKeys ( copyKeys , elementNode ) : evaluatedDictionary = { } for key in elementNode . attributes . keys ( ) : if ( key in copyKeys ) : evaluatedDictionary [ key ] = elementNode . attributes [ key ] else : addValueToEvaluatedDictionary ( elementNode , evaluatedDictionary , key ) return evaluatedDictionary
get the evaluated dictionary by copykeys .