@staticmethod<EOL><INDENT>def composite_update(item, update_dict, soft=False):<DEDENT>
item = Composite(item)<EOL>for part in item.get_content():<EOL><INDENT>if soft:<EOL><INDENT>for key, value in update_dict.items():<EOL><INDENT>if key not in part:<EOL><INDENT>part[key] = value<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>part.update(update_dict)<EOL><DEDENT><DEDENT>return item<EOL>
Takes a Composite (item) and updates all entries with values from
update_dict.  Updates can be soft in which case existing values are not
overwritten.

If item is of type string it is first converted to a Composite