'Call from the module to update metadata tags. Returns tuple
with bool indicating if there was a change and dict of new
tags to assign to the object.
:param tags: metadata tags from the object
:return: bool, dict'

def update_tags(self, tags):

    new_tags = (copy.copy(tags) if isinstance(tags, dict) else dict())
    changed = False
    if isinstance(self.module.params.get('tags'), dict):
        for (key, value) in self.module.params['tags'].items():
            if ((not new_tags.get(key)) or (new_tags[key] != value)):
                changed = True
                new_tags[key] = value
        if isinstance(tags, dict):
            for (key, value) in tags.items():
                if (not self.module.params['tags'].get(key)):
                    new_tags.pop(key)
                    changed = True
    return (changed, new_tags)
