Return true if over any of the node's edges, it has a molecular activity.
431990
def has_activity(graph: BELGraph, node: BaseEntity) -> bool:
    """"""
    return _node_has_modifier(graph, node, ACTIVITY)
346209
public boolean contains(Node s)
  {
    runTo(-1);

    if (null == m_map)
      return false;

    for (int i = 0; i < m_firstFree; i++)
    {
      Node node = m_map[i];

      if ((null != node) && node.equals(s))
        return true;
    }

    return false;
  }
25776
function visit(node) {
    if(node.flag) {
      var v = node.value.value
      var adj = v.adjacent
      for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) {
        var e = adj[ptr]
        var es = e.s
        var et = e.t
        if(es.euler[level].path(et.euler[level])) {
          raiseLevel(e)
          ptr -= 1
        } else {
          //Found the edge, relink components
          link(e)
          return true
        }
      }
    }
    if(node.left && node.left.flagAggregate) {
      if(visit(node.left)) {
        return true
      }
    }
    if(node.right && node.right.flagAggregate) {
      if(visit(node.right)) {
        return true
      }
    }
    return false
  }
234859
def _is_small_molecule(pe):
    """"""
    val = isinstance(pe, _bp('SmallMolecule')) or \
            isinstance(pe, _bpimpl('SmallMolecule')) or \
            isinstance(pe, _bp('SmallMoleculeReference')) or \
            isinstance(pe, _bpimpl('SmallMoleculeReference'))
    return val
1221901
def is_B_hypergraph(self):
        
        for hyperedge_id in self._hyperedge_attributes:
            head = self.get_hyperedge_head(hyperedge_id)
            if len(head) > 1:
                return False
        return True
142624
public function hasFlow()
    {
        foreach ($this->set->getEdges() as $edge) {
            if ($edge->getFlow() !== NULL) {
                return true;
            }
        }

        return false;
    }
56667
@Override
  protected boolean hasOverflow(FlatRStarTreeNode node) {
    if(node.isLeaf()) {
      return node.getNumEntries() == leafCapacity;
    }
    else if(node.getNumEntries() == node.getCapacity()) {
      node.increaseEntries();
    }
    return false;
  }
462915
public static boolean hasGraphRepresentation(IAtomContainer molecule) {
        for (IBond bond : molecule.bonds())
            if (bond.getAtomCount() != 2) return false;
        return true;
    }
591589
def has_edge(self, edge):
        
        u, v = edge
        return (u, v) in self.edge_properties
955374
def _check_graph(self, graph):
        """"""
        if graph.num_vertices != self.size:
            raise TypeError("The number of vertices in the graph does not "
                "match the length of the atomic numbers array.")
        # In practice these are typically the same arrays using the same piece
        # of memory. Just checking to be sure.
        if (self.numbers != graph.numbers).any():
            raise TypeError("The atomic numbers in the graph do not match the "
                "atomic numbers in the molecule.")
653084
public boolean contains(Node node2) {
        if ((getBeginLine() < node2.getBeginLine())
                || ((getBeginLine() == node2.getBeginLine()) && getBeginColumn() <= node2.getBeginColumn())) {
            if (getEndLine() > node2.getEndLine()) {
                return true;
            } else if ((getEndLine() == node2.getEndLine()) && getEndColumn() >= node2.getEndColumn()) {
                return true;
            }
        }
        return false;
    }
1222156
def overlaps_point(self, p):
        
        if self.is_empty():
            return False
        return bool(self.top_node.contains_point(p))
453518
function hasIncomingEdge(list, node) {
    for (var i = 0, l = list.length; i < l; ++i) {
      if (list[i].links.find(function(e,i,a){
        return node._id == e;
      })) return true;
    }
    return false;
  }
271978
def is_planar(graph):
    """"""
    # Determine connected components as subgraphs; their planarity is independent of each other
    connected_components = get_connected_components_as_subgraphs(graph)
    for component in connected_components:
        # Biconnected components likewise have independent planarity
        biconnected_components = find_biconnected_components_as_subgraphs(component)
        for bi_component in biconnected_components:
            planarity = __is_subgraph_planar(bi_component)
            if not planarity:
                return False
    return True
662579
def prevnode(edges, component):
    """"""
    e = edges
    c = component
    n2c = [(a, b) for a, b in e if type(a) == tuple]
    c2n = [(a, b) for a, b in e if type(b) == tuple]
    node2cs = [(a, b) for a, b in e if b == c]
    c2nodes = []
    for node2c in node2cs:
        c2node = [(a, b) for a, b in c2n if b == node2c[0]]
        if len(c2node) == 0:
            # return []
            c2nodes = []
            break
        c2nodes.append(c2node[0])
    cs = [a for a, b in c2nodes]
    # test for connections that have no nodes
    # filter for no nodes
    nonodes = [(a, b) for a, b in e if type(a) != tuple and type(b) != tuple]
    for a, b in nonodes:
        if b == component:
            cs.append(a)
    return cs
846454
def visit_If(self, node):
        
        currs = (node,)
        raises = ()

        # true branch
        for n in node.body:
            self.result.add_node(n)
            for curr in currs:
                self.result.add_edge(curr, n)
            currs, nraises = self.visit(n)
            raises += nraises
        if is_true_predicate(node.test):
            return currs, raises

        # false branch
        tcurrs = currs
        currs = (node,)
        for n in node.orelse:
            self.result.add_node(n)
            for curr in currs:
                self.result.add_edge(curr, n)
            currs, nraises = self.visit(n)
            raises += nraises
        return tcurrs + currs, raises
213104
private boolean containsNode(NodeList findings, Node node) {
        for (int i = 0; i < findings.getLength(); i++) {
            if (findings.item(i).equals(node)) {
                return true;
            }
        }

        return false;
    }