<commit_before>from collections import OrderedDict

from loggable import Loggable
from malcolm.core.attributemeta import AttributeMeta


class MapMeta(Loggable):
    """A meta object to store a set of attribute metas"""

    def __init__(self, name):
        super(MapMeta, self).__init__(logger_name=name)

        self.name = name
        self.elements = OrderedDict({})

    def add_element(self, attribute_meta, required=False):
        """
        Add an element, stating whether it is required.

        Args:
            attribute_meta(AttributeMeta): Attribute instance to store<commit_msg>Remove uneccesary dict definition, clarify doc string<commit_after>from collections import OrderedDict

from loggable import Loggable
from malcolm.core.attributemeta import AttributeMeta


class MapMeta(Loggable):
    """An object containing a set of AttributeMeta objects"""

    def __init__(self, name):
        super(MapMeta, self).__init__(logger_name=name)

        self.name = name
        self.elements = OrderedDict()

    def add_element(self, attribute_meta, required=False):
        """
        Add an element, stating whether it is required.

        Args:
            attribute_meta(AttributeMeta): Attribute instance to store
{'fraction_non_alphanumeric': 0.07673667205169628, 'fraction_numerical': 0.0, 'mean_word_length': 3.409252669039146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3707482', 'n_tokens_mistral': 335, 'n_tokens_neox': 323, 'n_words': 105}