Convenience function: Returns node.id, or node.name, or None
2611
def node_name(node):
    
    return hasattr(node, 'id') and node.id or hasattr(node, 'name') and node.name
787173
def _get_id(self):
        """"""
        ret = None
        row = self.row
        if row:
            ret = row["id"]
        return ret
1320065
def getnodefieldname(idfobject, endswith, fluid=None, startswith=None):
    """"""
    if startswith is None:
        startswith = ''
    if fluid is None:
        fluid = ''
    nodenames = getfieldnamesendswith(idfobject, endswith)
    nodenames = [name for name in nodenames if name.startswith(startswith)]
    fnodenames = [nd for nd in nodenames if nd.find(fluid) != -1]
    fnodenames = [name for name in fnodenames if name.startswith(startswith)]
    if len(fnodenames) == 0:
        nodename = nodenames[0]
    else:
        nodename = fnodenames[0]
    return nodename
829169
def getVertex(self, _id):
        """"""
        try:
            node = self.neograph.nodes.get(_id)
        except client.NotFoundError:
            return None
        return Vertex(node)
122857
def get(self, key, name=None):
        """"""
        if name is None:
            self.nodename = self.local_name
            self.nodeid = self.local_id
        else:
            self.logger.debug('Replacing nodename "{0}" with "{1}"'.format(self.nodename, name))
            self.nodename = name
            self.find_name()
        return get_value(self.stats(), fix_key(key))
411256
function getNameFromRoot(root: Object): string {
  // shallow
  if (root.unrendered) {
    const { type } = root.unrendered;
    return type.name || type;
  }

  const inst = instance(root);
  if (inst) {
    return inst._tag;
  }

  // direct node
  if (typeof root.type === 'string') {
    return root.type;
  }

  return typeof root.name === 'function' ? root.name() : '(anonymous)';
}
1324462
@Nonnull
    public static String getIRIFromNodeID(String nodeID) {
        if (nodeID.startsWith(PREFIX_SHARED_NODE)) {
            return nodeID;
        }
        return PREFIX_SHARED_NODE + nodeID.replace(NODE_ID_PREFIX, "");
    }
810867
def visit_Name(self, node):
        
        if isinstance(node.ctx, ast.Store):
            self.result[node.id] = True
107492
def get_node_by_name(self, nodename):
        
        for kind, nodes in self.nodes.items():
            for node in nodes:
                if node.name == nodename:
                    return node
        else:
            raise NodeNotFound(
                "Node `{0}` not found in cluster `{1}`"
                .format(nodename, self.name))
1185542
def device_id_from_name(device_name, nodes):
        
        device_id = None
        for node in nodes:
            if device_name == node['properties']['name']:
                device_id = node['id']
                break
        return device_id
1093727
def is_none(node):
    ""
    return isinstance(node, parso.python.tree.Keyword) and node.value == 'None'
370833
function findNodeById(registry, id)
		{
			var rv = null;
			registry.forEach((e,i,a)=>{
				if(e.id === id)
					rv = e;
			});
			
			return rv;
		}
354381
def _get_names(node, result):
    """"""
    if isinstance(node, ast.Name):
        return node.id + result
    elif isinstance(node, ast.Subscript):
        return result
    elif isinstance(node, ast.Starred):
        return _get_names(node.value, result)
    else:
        return _get_names(node.value, result + '.' + node.attr)
544520
def int_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, int):
            return id_or_name
        return None
265603
def name(self, node, children):
        ''
        return self.env.get(node.text.strip(), -1)
787684
def name(self, id):
        
        data = self.bytes(id, 'N')
        if not data:
            print("%x has no name" % id)
            return
        if data[:1] == b'\x00':
            nameid, = struct.unpack_from(">" + self.fmt, data, 1)
            nameblob = self.blob(self.nodebase, 'S', nameid * 256, nameid * 256 + 32)
            return nameblob.rstrip(b"\x00").decode('utf-8')
        return data.rstrip(b"\x00").decode('utf-8')
485152
def get_node(api_url=None, node_name=None, verify=False, cert=list()):
    
    return utils._make_api_request(api_url, '/nodes/{0}'.format(node_name), verify, cert)