def create_variable(
            self, code, name, speciation, variable_unit_id, sample_medium,
            value_type, is_regular, time_support, time_unit_id, data_type,
            general_category, no_data_value):
        var = Variable()
        var.code = code
        var.name = name
        var.speciation = speciation
        var.variable_unit_id = variable_unit_id
        var.sample_medium = sample_medium
        var.value_type = value_type
        var.is_regular = is_regular
        var.time_support = time_support
        var.time_unit_id = time_unit_id
        var.data_type = data_type
        var.general_category = general_category
        var.no_data_value = no_data_value

        self._edit_session.add(var)
        self._edit_session.commit()
        return var
Helper function to check if a storage type is enabled.
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/odmservices/series_service.py/SeriesService.create_variable--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/CheckStorageTypeEnabled