code: def _set_properties(self, node):
          
          self._cast_and_set_attributes_from_node_items(node.items())
          properties = parse_properties(node)
          if (not self.allow_duplicate_names and
                  self._contains_invalid_property_name(properties.items())):
              self._log_property_error_message()
              raise ValueError("Reserved names and duplicate names are not allowed. Please rename your property inside the .tmx-file")
  
          self.properties = properties
docs: Create dict containing Tiled object attributes from xml data
  
          read the xml attributes and tiled "properties" from a xml node and fill
          in the values into the object's dictionary.  Names will be checked to
          make sure that they do not conflict with reserved names.
  
          :param node: etree element
          :return: dict