code: def has_edge_within_group(self, group):
          
          assert group in self.nodes.keys(),\
              "{0} not one of the group of nodes".format(group)
          nodelist = self.nodes[group]
          for n1, n2 in self.simplified_edges():
              if n1 in nodelist and n2 in nodelist:
                  return True
docs: Checks whether there are within-group edges or not.