Valid python identifier representation of the expession.
552730
def natural_name(self) -> str:
        """"""
        name = self.expression.strip()
        for op in operators:
            name = name.replace(op, operator_to_identifier[op])
        return wt_kit.string2identifier(name)
978255
def isidentifier(s, dotted=False):
    '''
    
    '''
    if dotted:
        return all(isidentifier(a) for a in s.split('.'))
    if PY3:
        return s.isidentifier()
    else:
        import re
        _name_re = re.compile(r"[a-zA-Z_][a-zA-Z0-9_]*$")
        return bool(_name_re.match(s))
390312
def identifier(self):
        

        if self.moc is None:
            self.moc = MOC()

        self.moc.id = self.params.pop()
566311
def identifier_cmp(a, b):
    """"""

    a_cmp, a_is_int = _to_int(a)
    b_cmp, b_is_int = _to_int(b)

    if a_is_int and b_is_int:
        # Numeric identifiers are compared as integers
        return base_cmp(a_cmp, b_cmp)
    elif a_is_int:
        # Numeric identifiers have lower precedence
        return -1
    elif b_is_int:
        return 1
    else:
        # Non-numeric identifiers are compared lexicographically
        return base_cmp(a_cmp, b_cmp)
1056328
def identify(self, obj):
    """"""
    hash_ = hash(obj)
    type_id = self.to_id(type(obj))
    return (hash_, TypeId(type_id))
1188296
def _printable_id_code(self):
        
        code = super(ISWCCode, self)._printable_id_code()

        code1 = code[:3]
        code2 = code[3:6]
        code3 = code[-3:]

        return '%s.%s.%s' % (code1, code2, code3)
77557
def identifier(self, camelsplit=False, ascii=True):
        """"""
        return self.nameify(camelsplit=camelsplit, ascii=ascii, sep='_')
987034
def t_IDENTIFIER(self, t):
        '
        t.type = self.reserved_words.get(t.value, 'IDENTIFIER')
        return t
1337873
def is_valid(identifier):
    

    return (
        isinstance(identifier, six.string_types)
        and bool(NAME_RE.search(identifier))
        and not keyword.iskeyword(identifier)
    )
637223
def id_(reset=False):
    '''
    
    '''
    if reset:
        id_pattern = re.compile(r'Monit id (?P<id>[^ ]+)')
        cmd = 'echo y|monit -r'
        out = __salt__['cmd.run_all'](cmd, python_shell=True)
        ret = id_pattern.search(out['stdout']).group('id')
        return ret if ret else False
    else:
        cmd = 'monit -i'
        out = __salt__['cmd.run'](cmd)
        ret = out.split(':')[-1].strip()
    return ret
1314001
def __expr_str(cls, expr, level):
        ''''''
        ident = ' ' * level * 4

        if isinstance(expr, tuple):
            return '{}{}'.format(ident, str(expr))

        if expr.etype[0] in ['pvar', 'constant']:
            return '{}Expression(etype={}, args={})'.format(ident, expr.etype, expr.args)

        if not isinstance(expr, Expression):
            return '{}{}'.format(ident, str(expr))

        args = list(cls.__expr_str(arg, level + 1) for arg in expr.args)
        args = '\n'.join(args)
        return '{}Expression(etype={}, args=\n{})'.format(ident, expr.etype, args)
692755
def verify_identifiers(identifiers, n_items):
    """"""
    if identifiers is None:
        return identifiers

    identifiers = np.array(identifiers, copy=False)

    # Check length for consistency
    if len(identifiers) != n_items:
        raise ValueError("identifiers has inconsistent dimension.")

    # Check that identifiers are unique
    if len(np.unique(identifiers)) != n_items:
        raise ValueError("identifiers contains duplicate values.")

    return identifiers
96444
def identifier_md5(self):
        
        as_int = (self.identifier * 1e4).astype(np.int64)
        hashed = util.md5_object(as_int.tostring(order='C'))
        return hashed
246735
def grep_full_py_identifiers(tokens):
    
    global py_keywords
    tokens = list(tokens)
    i = 0
    while i < len(tokens):
        token_type, token = tokens[i]
        i += 1
        if token_type != "id":
            continue
        while i+1 < len(tokens) and tokens[i] == ("op", ".") and tokens[i+1][0] == "id":
            token += "." + tokens[i+1][1]
            i += 2
        if token == "":
            continue
        if token in py_keywords:
            continue
        if token[0] in ".0123456789":
            continue
        yield token
959156
def identify_core(core):
    """"""
    for datatype, identifier in {
            int: _identify_scaler,
            numpy.int8: _identify_scaler,
            numpy.int16: _identify_scaler,
            numpy.int32: _identify_scaler,
            numpy.int64: _identify_scaler,
            float: _identify_scaler,
            numpy.float16: _identify_scaler,
            numpy.float32: _identify_scaler,
            numpy.float64: _identify_scaler,
            chaospy.poly.base.Poly: _identify_poly,
            dict: _identify_dict,
            numpy.ndarray: _identify_iterable,
            list: _identify_iterable,
            tuple: _identify_iterable,
    }.items():
        if isinstance(core, datatype):
            return identifier(core)

    raise TypeError(
        "Poly arg: 'core' is not a valid type " + repr(core))
153661
def identifier(self):
        
        if len(self.polygons_full) != 1:
            raise TypeError('Identifier only valid for single body')
        return polygons.polygon_hash(self.polygons_full[0])
1292063
def handle_identifier_qualified(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        """"""
        namespace, name = tokens[NAMESPACE], tokens[NAME]

        self.raise_for_missing_namespace(line, position, namespace, name)
        self.raise_for_missing_name(line, position, namespace, name)

        return tokens