'Add the keys in policy to metadata, after processing them
through the attrmap.  Updates the metadata dict in place.'

@classmethod
def apply_policy(cls, metadata, policy):

    for (attr, value) in policy.iteritems():
        attr = cls._translate(attr)
        if (attr not in cls.fields):
            metadata['xml_attributes'][attr] = value
        else:
            metadata[attr] = value
