Transform an access flags to the corresponding string

      :param value: the value of the access flags
      :type value: int

      :rtype: string
516577
def get_access_flags_string(value):
    
    buff = ""
    for i in ACCESS_FLAGS:
        if (i[0] & value) == i[0]:
            buff += i[1] + " "

    if buff != "":
        return buff[:-1]
    return buff
659808
def set_APSR_flag_to_value(self, flag, value):
        
        if flag == 'N':
            bit = 31
        elif flag == 'Z':
            bit = 30
        elif flag == 'C':
            bit = 29
        elif flag == 'V':
            bit = 28
        else:
            raise AttributeError("Flag {} does not exist in the APSR".format(flag))

        if value:
            self.register['APSR'] |= (1 << bit)
        else:
            self.register['APSR'] -= (1 << bit) if (self.register['APSR'] & (1 << bit)) else 0
160512
def encode(self, value):
        
        if value is None and self._default is not None:
            value = self._default

        for encoder in self._encoders:
            try:
                return encoder(value)
            except ValueError as ex:
                pass

        raise ValueError('Value \'{}\' is invalid. {}'
                         .format(value, ex.message))
1248053
def normalize_value(value)
      unless value.is_a?(Hash)
        value = value.respond_to?(:to_ary) ? value.to_ary : value.to_str
      end

      # Handle unicode normalization
      if value.kind_of?(Array)
        value.map! { |val| Addressable::IDNA.unicode_normalize_kc(val) }
      elsif value.kind_of?(Hash)
        value = value.inject({}) { |acc, (k, v)|
          acc[Addressable::IDNA.unicode_normalize_kc(k)] =
            Addressable::IDNA.unicode_normalize_kc(v)
          acc
        }
      else
        value = Addressable::IDNA.unicode_normalize_kc(value)
      end
      value
    end
694703
def str_to_uuid(value):
    
    if isfunction(value):
        value = value()

    return UUID(value) if isinstance(value, string_types) else value
294479
def _value_encode(cls, member, value):
        
        try:
            field_validator = cls.fields[member]
        except KeyError:
            return cls.valueparse.encode(value)

        return field_validator.encode(value)
1007394
def token(self, value):
        
        if value is None:
            self._token = value
            return
        if not isinstance(value, str):
            value = str(value)
        if len(value) > 256:
            raise AttributeError
        self._token = value
209290
def fromSet(self, values):
        
        value = 0
        for flag in values:
            value |= self(flag)
        return value
865256
def format_cli(self, value):
        
        if value is None or (self.type == 'flag' and not value):
            return None
        pass_as_bits = text_type(self.pass_as or self.default_pass_as).split()
        env = dict(name=self.name, value=value, v=value)
        return [bit.format(**env) for bit in pass_as_bits]
842991
def to_python(self, value):
		
		if isinstance(value, six.string_types):
			return value
		if value is None:
			return value
		return _unsigned_integer_to_hex_string(value)
945388
def valueFromString(self, value, context=None):
        
        model = self.referenceModel()
        return model(value, context=context)
130380
def _transform(self, value):
        
        if self.transform:
            try:
                value = self.transform(value)
            except:
                import sys
                exc_type, exc_obj, exc_tb = sys.exc_info()
                raise AssertionError('Error applying transformation <{0}>: {2}: {3}'.format(
                    self.transform.__name__, value, exc_type.__name__, exc_obj))

        return value
300870
def str_if_not_none(value):
    
    if not(value is None or isinstance(value, string_types)):
        value = str(value)

    return value
36261
def encode(self, value):
        
        if type(value) == str and self.enum and value in self.enum:
            value = self.enum[value]
        return self.type.encode(value) if self.type else bytearray()
27104
def _to_str(self, value, field_begin, field_len):
        
        value_str = '{0:0{1}d}'.format(value, field_len)
        if self.precision is not None and \
                self.precision < field_begin + field_len:
            # field is partly or completely affected by precision
            # -> replace insignificant digits with asterisks
            precision_index = max(0, self.precision - field_begin)
            value_str = value_str[:precision_index] + \
                '*' * (field_len - precision_index)
        return value_str
893203
def to_json(self, value):
        
        if self._enable_enforce_type:
            value = self.enforce_type(value)
        return super(XMLString, self).to_json(value)
617824
def toString(value, mode):
    
    string = angle.toString(value)
    sign = string[0]
    separator = CHAR[mode][sign]
    string = string.replace(':', separator, 1)
    return string[1:]