docs: def grid_2d_8graph(self, m, n):
          """Make a 2d graph that's connected 8 ways, enabling diagonal movement"""
          me = nx.Graph()
          node = me.node
          add_node = me.add_node
          add_edge = me.add_edge
          for i in range(m):
              for j in range(n):
                  add_node((i, j))
                  if i > 0:
                      add_edge((i, j), (i-1, j))
                      if j > 0:
                          add_edge((i, j), (i-1, j-1))
                  if j > 0:
                      add_edge((i, j), (i, j-1))
                  if (i - 1, j + 1) in node:
                      add_edge((i, j), (i-1, j+1))
          return self.copy_from(me)