public function applyLabelsToField($module_definition, $field_name, $value)
    {
        $key = $field_name;
        if (array_key_exists($field_name, $module_definition)) {
            $field_definition = $module_definition[$field_name];
            if (isset($field_definition['vname'])) {
                $field_name = $field_definition['vname'];
            }
            if (isset($field_definition['type'])) {
                switch ($field_definition['type']) {
                    case 'enum':
                        if (isset($field_definition['options_list'][$value])) {
                            $value = $field_definition['options_list'][$value];
                        }
                        break;
                    case 'bool':
                        $value = $value ? self::BOOL_TRUE : self::BOOL_FALSE;
                        break;
                }
            }
        }
        return array($field_name, $value);
    }