def _ann_store_annotations(self, item_with_annotations, node, overwrite=False):
<EOL>if overwrite is True or overwrite == '<STR_LIT>':<EOL><INDENT>annotated = self._all_get_from_attrs(node, HDF5StorageService.ANNOTATED)<EOL>if annotated:<EOL><INDENT>current_attrs = node._v_attrs<EOL>for attr_name in current_attrs._v_attrnames:<EOL><INDENT>if attr_name.startswith(HDF5StorageService.ANNOTATION_PREFIX):<EOL><INDENT>delattr(current_attrs, attr_name)<EOL><DEDENT><DEDENT>delattr(current_attrs, HDF5StorageService.ANNOTATED)<EOL>self._hdf5file.flush()<EOL><DEDENT><DEDENT>if not item_with_annotations.v_annotations.f_is_empty():<EOL><INDENT>anno_dict = item_with_annotations.v_annotations._dict<EOL>current_attrs = node._v_attrs<EOL>changed = False<EOL>for field_name in anno_dict:<EOL><INDENT>val = anno_dict[field_name]<EOL>field_name_with_prefix = HDF5StorageService.ANNOTATION_PREFIX + field_name<EOL>if field_name_with_prefix not in current_attrs:<EOL><INDENT>setattr(current_attrs, field_name_with_prefix, val)<EOL>changed = True<EOL><DEDENT><DEDENT>if changed:<EOL><INDENT>setattr(current_attrs, HDF5StorageService.ANNOTATED, True)<EOL>self._hdf5file.flush()<EOL><DEDENT><DEDENT>
Stores annotations into an hdf5 file.