node is a class attribute that is a mongoengine. Returns
     the definition statement for the attribute
493860
def get_field_definition(node):
    "

    name = node.attrname
    cls = get_node_parent_class(node)
    definition = cls.lookup(name)[1][0].statement()
    return definition
1124062
def _parse_property(self, node):
        # type: (ElementTree.Element) -> Tuple[str, Any]
        
        # Get information
        name = node.attrib[ATTR_NAME]
        vtype = node.attrib.get(ATTR_VALUE_TYPE, TYPE_STRING)

        # Look for a value as a single child node
        try:
            value_node = next(iter(node))
            value = self._parse_value_node(vtype, value_node)
        except StopIteration:
            # Value is an attribute
            value = self._convert_value(vtype, node.attrib[ATTR_VALUE])

        return name, value
616035
function nodeClass (name, res) {
    var patt = name;
    if (res) {
      patt += res.type === "array"
        ? "(" + res.pattern.substring(1, res.pattern.length - 1) + ")"
        : res.pattern;
    }
    return node("class", patt, name, res ? [res] : undefined);
  }
110566
def find_node(self, attribute):
        

        for model in GraphModel._GraphModel__models_instances.itervalues():
            for node in foundations.walkers.nodes_walker(model.root_node):
                if attribute in node.get_attributes():
                    return node
900641
def attr(self, name, lineno=None):
        
        return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno)
1055732
function node(name, attributes) {
    "use strict";
    var _node   = document.createElementNS('', name);
    for (var attrName in attributes) {
        var value = attributes[attrName];
        if (attributes.hasOwnProperty(attrName) && isString(attrName)) {
            _node.setAttribute(attrName, value);
        }
    }
    return _node;
}
464045
def attribute(*args)
      node = Nodes::Attribute.new

      if args.first.is_a?(Hash)
        args.first.each_pair { |k, v| node[v] = k }
      else
        options = args.extract_options!
        args.each { |name|
          key = options[:as] || name
          node[key] = name
        }
        node.condition = options[:if]
      end

      @template.add_node node
    end
767185
private ZooClassDef locateClassDefinition(Class<?> cls, Node node) {
		ZooClassDef def = cache.getSchema(cls, node);
		if (def == null || def.jdoZooIsDeleted()) {
			return null;
		}
		return def;
	}
1089456
private au.csiro.ontology.Node getNode(OWLClass oc) {
        final Object id = getId(oc);

        final au.csiro.ontology.Node n;

        if(id instanceof String) {
            n = getTaxonomy().getNode((String)id);
        } else if(NamedConcept.TOP.equals(id)) {
            n = getTaxonomy().getTopNode();
        } else if(NamedConcept.BOTTOM.equals(id)) {
            n = getTaxonomy().getBottomNode();
        } else {
            throw new RuntimeException("Unexpected id "+id);
        }

        return n;
    }
514134
def _obj_getattr(obj, fqdn, start=1):
    
    node = obj
    for chain in fqdn.split('.')[start:]:
        if hasattr(node, chain):
            node = getattr(node, chain)
        else:
            node = None
            break
    return node
285956
def _attribute_is_magic(node, attrs, parents):
    """"""
    if node.attrname not in attrs:
        return False
    if not node.last_child():
        return False

    try:
        for cls in node.last_child().inferred():
            if isinstance(cls, Super):
                cls = cls._self_class  # pylint: disable=protected-access
            if node_is_subclass(cls, *parents) or cls.qname() in parents:
                return True
    except InferenceError:
        pass
    return False
201263
function getClassWeight (node) {
  if (node === null || node.length === 0) {
    return 0
  }
  const name = node.get(0).name || ''
  const cls = node.attr('class') || ''
  const nid = node.attr('id') || ''
  let weight = 0

  // Schema.org/Article
  if (node.attr('itemprop') && /articleBody/.test(node.attr('itemprop'))) {
    weight += 50
  }
  // Nodes of type text
  if (node.attr('type') && node.attr('type') === 'text') {
    weight += 30
  }
  // Special cases
  if (name === 'article') {
    weight += 25
  }
  if (name === 'section') {
    weight += 10
  }
  if (name === 'header' || name === 'aside' || name === 'footer') {
    weight -= 25
  }
  if (cls === 'comments' && nid === 'comments') {
    weight -= 25
  }

  if (cls.search(regexps.negativeRe) !== -1) {
    weight -= 25
  }
  if (nid.search(regexps.negativeRe) !== -1) {
    weight -= 20
  }
  if (cls.search(regexps.positiveRe) !== -1) {
    weight += 25
  }
  if (nid.search(regexps.positiveRe) !== -1) {
    weight += 20
  }

  return weight
}
507900
def parse_define_attr(name, spec)
      err(ParseError, "Can't define '#{name}' outside a node") unless
        @last_node

      err(RedefinedError, "Can't redefine '#{name}' in node #{@last_node}") if
        @node_attrs[@last_node].member? name

      @node_attrs[@last_node] << name

      checks = spec.map do |a|
        n = a.index('.') ? a : "#{@last_node}.#{a}"
        "_x.member?('#{n}') ? raise('#{n}') : #{a}#{POST}(_x + ['#{n}'])"
      end.join(';')

      code =
        "class #{@last_node}; def self.#{name}#{POST}(_x); #{checks}; end; end"

      # pp code

      @pm.module_eval(code)

      begin
        parse_call_attr(@last_node, name)
      rescue RuntimeError
        err(RecursionError, "'#{name}' is recursive")
      end
    end
1364908
def is_domain_class_collection_attribute(ent, attr_name):
    
    attr = get_domain_class_attribute(ent, attr_name)
    return attr.kind == RESOURCE_ATTRIBUTE_KINDS.COLLECTION
517041
def _objectify(self, node, binding, depth, path):
        
        if binding.is_object:
            obj = {'$schema': binding.path}
            for (s, p, o) in self.graph.triples((node, None, None)):
                prop = binding.get_property(p)
                if prop is None or depth <= 1 or o in path:
                    continue
                # This is slightly odd but yield purty objects:
                if depth <= 2 and (prop.is_array or prop.is_object):
                    continue
                sub_path = path.union([node])
                value = self._objectify(o, prop, depth - 1, sub_path)
                if prop.is_array and prop.name in obj:
                    obj[prop.name].extend(value)
                else:
                    obj[prop.name] = value
            return obj
        elif binding.is_array:
            for item in binding.items:
                return [self._objectify(node, item, depth, path)]
        else:
            return node.toPython()
984501
def convert_to_node(instance, xml_node: XmlNode, node_globals: InheritedDict = None)\
    -> InstanceNode:
    ''''''
    return InstanceNode(instance, xml_node, node_globals)
215784
def get_doc(node):
    
    res = " ".join(get_doc_annotations(node))
    if not res:
        res = "(%s)" % node.__class__.__name__.lower()
    return res