code: def add_path(self, nodes, **attr):
          
          if nx.__version__[0] == "1":
              return super().add_path(nodes, **attr)
          else:
              return nx.add_path(self, nodes, **attr)
docs: In replacement for Deprecated add_path method