Return suitable and valid attribute name. This method replaces dash char to underscore. If name
		is invalid ValueError exception is raised

		:param name: cookie attribute name
		:return: str
970736
def __attr_name(self, name):
		
		if name not in self.cookie_attr_value_compliance.keys():
			suggested_name = name.replace('_', '-').lower()
			if suggested_name not in self.cookie_attr_value_compliance.keys():
				raise ValueError('Invalid attribute name is specified')
			name = suggested_name
		return name
1171172
def convert_to_underscore_separated(self, name):
        
        metric_name = self.FIRST_CAP_RE.sub(br'\1_\2', ensure_bytes(name))
        metric_name = self.ALL_CAP_RE.sub(br'\1_\2', metric_name).lower()
        metric_name = self.METRIC_REPLACEMENT.sub(br'_', metric_name)
        return self.DOT_UNDERSCORE_CLEANUP.sub(br'.', metric_name).strip(b'_')
104917
def validate_name(self, name: str):
        
        parts = self.NAME_SPLIT_RE.split(name)
        for part in parts:
            if not part.isidentifier() or keyword.iskeyword(part):
                raise ValueError('Incorrect route name {!r}, '
                                 'the name should be a sequence of '
                                 'python identifiers separated '
                                 'by dash, dot or column'.format(name))
        if name in self._named_resources:
            raise ValueError('Duplicate {!r}, '
                             'already handled by {!r}'
                             .format(name, self._named_resources[name]))
1150916
def get_secure_cookie_key_version(
        self, name: str, value: str = None
    ) -> Optional[int]:
        
        self.require_setting("cookie_secret", "secure cookies")
        if value is None:
            value = self.get_cookie(name)
        if value is None:
            return None
        return get_signature_key_version(value)
1143614
def attribute_name(self, attribute_name):
        

        if attribute_name is None:
            raise ValueError("Invalid value for `attribute_name`, must not be `None`")
        if len(attribute_name) < 1:
            raise ValueError("Invalid value for `attribute_name`, length must be greater than or equal to `1`")

        self._attribute_name = attribute_name
1153720
function(_name){
            var _cookie = document.cookie,
                _search = '\\b'+_name+'=',
                _index1 = _cookie.search(_search);
            if (_index1<0) return '';
            _index1 += _search.length-2;
            var _index2 = _cookie.indexOf(';',_index1);
            if (_index2<0) _index2 = _cookie.length;
            return _cookie.substring(_index1,_index2)||'';
        }
528032
def _meta_name(self, name):
        
        name = name.upper().replace('-', '_')
        if name not in self.UNPREFIXED_HEADERS:
            name = 'HTTP_' + name
        return name
730707
def get_attr(self, name, default=None, fail_silently=True):
        
        try:
            return getattr(self, name)
        except KeyError:
            extra_context = getattr(self, "extra_context")

            if name in extra_context:
                value = extra_context[name]

                if callable(value):
                    return value(request=None)

            return default
94682
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 128:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `128`")
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")
        if name is not None and not re.search('^[^\/]+$', name):
            raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[^\/]+$/`")

        self._name = name
1095364
def underToMixed(name):
    
    if name.endswith('_id'):
        return underToMixed(name[:-3] + "ID")
    return _underToMixedRE.sub(lambda m: m.group(0)[1].upper(),
                               name)
167150
def _validate_name(name):
    '''
    
    '''
    name = six.text_type(name)
    name_length = len(name)
    regex = re.compile(r'^[a-zA-Z0-9][A-Za-z0-9_-]*[a-zA-Z0-9]$')

    if name_length < 3 or name_length > 48:
        ret = False
    elif not re.match(regex, name):
        ret = False
    else:
        ret = True

    if ret is False:
        log.warning(
            'A Linode label may only contain ASCII letters or numbers, dashes, and '
            'underscores, must begin and end with letters or numbers, and be at least '
            'three characters in length.'
        )

    return ret
653336
def getAttributeName(self, name):
        '''
        '''
        if self.func_aname is None:
            return name
        assert callable(self.func_aname), \
            'expecting callable method for attribute func_aname, not %s' %type(self.func_aname)
        f = self.func_aname
        return f(name)
243975
def get_available_name(self, name):
        
        local_available_name = self.local.get_available_name(name)
        remote_available_name = self.remote.get_available_name(name)

        if remote_available_name > local_available_name:
            return remote_available_name
        return local_available_name
851506
def nametonum(name):
    
    code = colorcodes.get(name)
    if code is None:
        raise ValueError("%s is not a valid color name." % name)
    else:
        return code
1196481
def _parse_name(name):
    
    required = False

    if name[-1] == '*':
        name = name[0:-1]
        required = True

    return name, required
337004
@Override
    public String cookieValue(String name) {
        return CookieHelper.getCookieValue(name, request().cookies());
    }
1044717
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 200:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `200`")

        self._name = name