<commit_before>import cybox
import cybox.bindings.cybox_core_1_0 as core_binding
from cybox.common.structured_text import Structured_Text
from cybox.core.object import Object

class StatefulMeasure(cybox.Entity):
    """CybOX StatefulMeasure

    Only implements a contained Object for now.
    """
    def __init__(self, object_=None):
        # If not a CybOX Object, try to coerce to one
        if object_ and not isinstance(object_, Object):
            object_ = Object(object_)
        self.object_ = object_

    def to_obj(self):
        sm_obj = core_binding.StatefulMeasureType()
        sm_obj.set_Object(self.object_.to_obj())
        return sm_obj

    def to_dict(self):
        return {'object': self.object_.to_dict()}

    @staticmethod
    def from_obj(statefulmeasure_obj):
        sm = StatefulMeasure()
        sm.object_ = Object.from_obj(statefulmeasure_obj.get_Object())
        return sm

    @staticmethod
    def from_dict(statefulmeasure_dict):
        sm = StatefulMeasure()
        sm.object_ = Object.from_dict(statefulmeasure_dict.get('object'))<commit_msg>Fix typo and remove unused import<commit_after>import cybox
import cybox.bindings.cybox_core_1_0 as core_binding
#from cybox.common.structured_text import StructuredText
from cybox.core.object import Object

class StatefulMeasure(cybox.Entity):
    """CybOX StatefulMeasure

    Only implements a contained Object for now.
    """
    def __init__(self, object_=None):
        # If not a CybOX Object, try to coerce to one
        if object_ and not isinstance(object_, Object):
            object_ = Object(object_)
        self.object_ = object_

    def to_obj(self):
        sm_obj = core_binding.StatefulMeasureType()
        sm_obj.set_Object(self.object_.to_obj())
        return sm_obj

    def to_dict(self):
        return {'object': self.object_.to_dict()}

    @staticmethod
    def from_obj(statefulmeasure_obj):
        sm = StatefulMeasure()
        sm.object_ = Object.from_obj(statefulmeasure_obj.get_Object())
        return sm

    @staticmethod
    def from_dict(statefulmeasure_dict):
        sm = StatefulMeasure()
        sm.object_ = Object.from_dict(statefulmeasure_dict.get('object'))
{'fraction_non_alphanumeric': 0.08590909090909091, 'fraction_numerical': 0.0018181818181818182, 'mean_word_length': 3.200381679389313, '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': '2950403', 'n_tokens_mistral': 675, 'n_tokens_neox': 656, 'n_words': 156}