<commit_before>import cybox.bindings.cybox_common_types_1_0 as common_binding
from cybox.common.environment_variable import Environment_Variable

class Environment_Variable_List(object):
    def __init__(self):
        pass

    @classmethod
    def object_from_list(cls, environment_variable_list):
        """Create the Environment Variable List object representation from an input list of Environment Variable dictionaries."""
        env_variable_list = common_binding.EnvironmentVariableListType()
        for env_variable in environment_variable_list:
            Environment_Variable_object = Environment_Variable.object_from_dict(env_variable)
            if Environment_Variable_object.hasContent_():
                env_variable_list.add_Environment_Variable(Environment_Variable_object)
        return env_variable_list

    @classmethod
    def list_from_object(cls, environment_variable_list_obj):
        """Parse and return a list of Enviroment Variable dictionaries for a Environment Variable List object."""
        env_variable_list = []
        for env_variable in environment_variable_list_obj.get_Environment_Variable():
            env_variable_dict = Environment_Variable.dict_from_object(env_variable)
            env_variable_list.append(env_variable_dict)
        return env_variable_list<commit_msg>Added simple API representation for environment_variable_list<commit_after>import cybox.bindings.cybox_common_types_1_0 as common_binding
from cybox.common.environment_variable import EnvironmentVariable

class EnvironmentVariableList(object):
    def __init__(self):
        self.environment_variables = []

    def add_environment_variable(self, environment_variable):
        self.environment_variables.append(environment_variable)

    def to_obj(self):
        env_variable_list_obj = common_binding.EnvironmentVariableListType()
        for environment_variable_obj in self.environment_variables:
            env_variable_list_obj.add_Environment_Variable(environment_variable_obj.to_obj())
        return env_variable_list_obj


    def to_list(self):
        env_variable_list = []
        for environment_variable_obj in self.environment_variables:
            env_variable_list.append(environment_variable_obj.to_dict())
        return env_variable_list

    @staticmethod
    def from_list(environment_variable_list):
        if not environment_variable_list:
            return None

        env_variable_list_ = EnvironmentVariableList()
        for environment_variable_dict in environment_variable_list:
            env_variable_list_.add_environment_variable(EnvironmentVariable.from_dict(environment_variable_dict))
        return env_variable_list_

    @staticmethod
    def from_obj(environment_variable_list_obj):
        if not environment_variable_list_obj:
            return None

        env_variable_list_ = EnvironmentVariableList()
        for environment_variable_obj in environment_variable_list_obj.get_Environment_Variable():
            env_variable_list_.add_environment_variable(EnvironmentVariable.from_obj(environment_variable_obj))
        return env_variable_list_
{'fraction_non_alphanumeric': 0.049201277955271565, 'fraction_numerical': 0.0012779552715654952, 'mean_word_length': 4.271043771043771, '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': '3507631', 'n_tokens_mistral': 790, 'n_tokens_neox': 773, 'n_words': 150}