docs: def _parse_txtinfo(self, data):
          """
          Converts the python list returned by self._txtinfo_to_python()
          to a NetworkX Graph object, which is then returned.
          """
          graph = self._init_graph()
          for link in data:
              graph.add_edge(link['source'],
                             link['target'],
                             weight=link['cost'])
          return graph