code: def inconsistent(self):
          r
          messages = []
          for node in list(self.__tweights.keys()):
              if not node <= self.__nodes: messages.append("Node {} in t-weights but not in nodes.".format(node))
          for node in self.__snodes:
              if not node <= self.__nodes: messages.append("Node {} in s-nodes but not in nodes.".format(node))
          for node in self.__tnodes:
              if not node <= self.__nodes: messages.append("Node {} in t-nodes but not in nodes.".format(node))
          for e in list(self.__nweights.keys()):
              if not e[0] <= self.__nodes: messages.append("Node {} in edge {} but not in nodes.".format(e[0], e))
              if not e[1] <= self.__nodes: messages.append("Node {} in edge {} but not in nodes.".format(e[1], e))
              if (e[1], e[0]) in iter(list(self.__nweights.keys())): messages.append("The reversed edges of {} is also in the n-weights.".format(e))
                  
              
          if 0 == len(messages): return False
          else: return messages
docs: r"""
          Perform some consistency tests on the graph represented by this object
          
          Returns
          -------
          consistent : bool or list
              False if consistent, else a list of inconsistency messages.
          
          Notes
          -----
          This check is very time intensive and should not be executed on huge
          graphs, except for debugging purposes.