def _set_attributes(self):
        self._attributes = {}
        all_attributes = list(_get_all_attributes(self._root_node))
        for key, value in all_attributes:
            # commented since enketo forms may have the template attribute in
            # multiple xml tags and I dont see the harm in overiding
            # attributes at this point
            try:
                assert key not in self._attributes
            except __HOLE__:
                import logging
                logger = logging.getLogger("console_logger")
                logger.debug("Skipping duplicate attribute: %s"
                             " with value %s" % (key, value))
                logger.debug(str(all_attributes))
            else:
                self._attributes[key] = value
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/logger/xform_instance_parser.py/XFormInstanceParser._set_attributes