docs: def eight_node(cm=False):
      """Eight-node network."""
      tpm = np.array([
          [0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0, 0, 1],
          [1, 0, 0, 0, 0, 0, 0, 0],
          [1, 1, 0, 0, 0, 0, 0, 1],
          [0, 1, 0, 0, 0, 0, 0, 0],
          [0, 1, 0, 0, 0, 0, 0, 1],
          [1, 1, 1, 0, 0, 0, 0, 0],
          [1, 0, 1, 0, 0, 0, 0, 1],
          [0, 0, 1, 0, 0, 0, 0, 0],
          [0, 0, 1, 0, 0, 0, 0, 1],
          [1, 0, 1, 0, 0, 0, 0, 0],
          [1, 1, 1, 0, 0, 0, 0, 1],
          [0, 1, 1, 1, 0, 0, 0, 0],
          [0, 1, 1, 1, 0, 0, 0, 1],
          [1, 1, 0, 1, 0, 0, 0, 0],
          [1, 0, 0, 1, 0, 0, 0, 1],
          [0, 0, 0, 1, 0, 0, 0, 0],
          [0, 0, 0, 1, 0, 0, 0, 1],
          [1, 0, 0, 1, 0, 0, 0, 0],
          [1, 1, 0, 1, 0, 0, 0, 1],
          [0, 1, 0, 1, 0, 0, 0, 0],
          [0, 1, 0, 1, 0, 0, 0, 1],
          [1, 1, 1, 1, 0, 0, 0, 0],
          [1, 0, 1, 1, 0, 0, 0, 1],
          [0, 0, 1, 1, 1, 0, 0, 0],
          [0, 0, 1, 1, 1, 0, 0, 1],
          [1, 0, 1, 1, 1, 0, 0, 0],
          [1, 1, 1, 1, 1, 0, 0, 1],
          [0, 1, 1, 0, 1, 0, 0, 0],
          [0, 1, 1, 0, 1, 0, 0, 1],
          [1, 1, 0, 0, 1, 0, 0, 0],
          [1, 0, 0, 0, 1, 0, 0, 1],
          [0, 0, 0, 0, 1, 0, 0, 0],
          [0, 0, 0, 0, 1, 0, 0, 1],
          [1, 0, 0, 0, 1, 0, 0, 0],
          [1, 1, 0, 0, 1, 0, 0, 1],
          [0, 1, 0, 0, 1, 0, 0, 0],
          [0, 1, 0, 0, 1, 0, 0, 1],
          [1, 1, 1, 0, 1, 0, 0, 0],
          [1, 0, 1, 0, 1, 0, 0, 1],
          [0, 0, 1, 0, 1, 0, 0, 0],
          [0, 0, 1, 0, 1, 0, 0, 1],
          [1, 0, 1, 0, 1, 0, 0, 0],
          [1, 1, 1, 0, 1, 0, 0, 1],
          [0, 1, 1, 1, 1, 0, 0, 0],
          [0, 1, 1, 1, 1, 0, 0, 1],
          [1, 1, 0, 1, 1, 0, 0, 0],
          [1, 0, 0, 1, 1, 0, 0, 1],
          [0, 0, 0, 1, 1, 1, 0, 0],
          [0, 0, 0, 1, 1, 1, 0, 1],
          [1, 0, 0, 1, 1, 1, 0, 0],
          [1, 1, 0, 1, 1, 1, 0, 1],
          [0, 1, 0, 1, 1, 1, 0, 0],
          [0, 1, 0, 1, 1, 1, 0, 1],
          [1, 1, 1, 1, 1, 1, 0, 0],
          [1, 0, 1, 1, 1, 1, 0, 1],
          [0, 0, 1, 1, 0, 1, 0, 0],
          [0, 0, 1, 1, 0, 1, 0, 1],
          [1, 0, 1, 1, 0, 1, 0, 0],
          [1, 1, 1, 1, 0, 1, 0, 1],
          [0, 1, 1, 0, 0, 1, 0, 0],
          [0, 1, 1, 0, 0, 1, 0, 1],
          [1, 1, 0, 0, 0, 1, 0, 0],
          [1, 0, 0, 0, 0, 1, 0, 1],
          [0, 0, 0, 0, 0, 1, 0, 0],
          [0, 0, 0, 0, 0, 1, 0, 1],
          [1, 0, 0, 0, 0, 1, 0, 0],
          [1, 1, 0, 0, 0, 1, 0, 1],
          [0, 1, 0, 0, 0, 1, 0, 0],
          [0, 1, 0, 0, 0, 1, 0, 1],
          [1, 1, 1, 0, 0, 1, 0, 0],
          [1, 0, 1, 0, 0, 1, 0, 1],
          [0, 0, 1, 0, 0, 1, 0, 0],
          [0, 0, 1, 0, 0, 1, 0, 1],
          [1, 0, 1, 0, 0, 1, 0, 0],
          [1, 1, 1, 0, 0, 1, 0, 1],
          [0, 1, 1, 1, 0, 1, 0, 0],
          [0, 1, 1, 1, 0, 1, 0, 1],
          [1, 1, 0, 1, 0, 1, 0, 0],
          [1, 0, 0, 1, 0, 1, 0, 1],
          [0, 0, 0, 1, 0, 1, 0, 0],
          [0, 0, 0, 1, 0, 1, 0, 1],
          [1, 0, 0, 1, 0, 1, 0, 0],
          [1, 1, 0, 1, 0, 1, 0, 1],
          [0, 1, 0, 1, 0, 1, 0, 0],
          [0, 1, 0, 1, 0, 1, 0, 1],
          [1, 1, 1, 1, 0, 1, 0, 0],
          [1, 0, 1, 1, 0, 1, 0, 1],
          [0, 0, 1, 1, 1, 1, 0, 0],
          [0, 0, 1, 1, 1, 1, 0, 1],
          [1, 0, 1, 1, 1, 1, 0, 0],
          [1, 1, 1, 1, 1, 1, 0, 1],
          [0, 1, 1, 0, 1, 1, 0, 0],
          [0, 1, 1, 0, 1, 1, 0, 1],
          [1, 1, 0, 0, 1, 1, 0, 0],
          [1, 0, 0, 0, 1, 1, 0, 1],
          [0, 0, 0, 0, 1, 1, 1, 0],
          [0, 0, 0, 0, 1, 1, 1, 1],
          [1, 0, 0, 0, 1, 1, 1, 0],
          [1, 1, 0, 0, 1, 1, 1, 1],
          [0, 1, 0, 0, 1, 1, 1, 0],
          [0, 1, 0, 0, 1, 1, 1, 1],
          [1, 1, 1, 0, 1, 1, 1, 0],
          [1, 0, 1, 0, 1, 1, 1, 1],
          [0, 0, 1, 0, 1, 1, 1, 0],
          [0, 0, 1, 0, 1, 1, 1, 1],
          [1, 0, 1, 0, 1, 1, 1, 0],
          [1, 1, 1, 0, 1, 1, 1, 1],
          [0, 1, 1, 1, 1, 1, 1, 0],
          [0, 1, 1, 1, 1, 1, 1, 1],
          [1, 1, 0, 1, 1, 1, 1, 0],
          [1, 0, 0, 1, 1, 1, 1, 1],
          [0, 0, 0, 1, 1, 0, 1, 0],
          [0, 0, 0, 1, 1, 0, 1, 1],
          [1, 0, 0, 1, 1, 0, 1, 0],
          [1, 1, 0, 1, 1, 0, 1, 1],
          [0, 1, 0, 1, 1, 0, 1, 0],
          [0, 1, 0, 1, 1, 0, 1, 1],
          [1, 1, 1, 1, 1, 0, 1, 0],
          [1, 0, 1, 1, 1, 0, 1, 1],
          [0, 0, 1, 1, 0, 0, 1, 0],
          [0, 0, 1, 1, 0, 0, 1, 1],
          [1, 0, 1, 1, 0, 0, 1, 0],
          [1, 1, 1, 1, 0, 0, 1, 1],
          [0, 1, 1, 0, 0, 0, 1, 0],
          [0, 1, 1, 0, 0, 0, 1, 1],
          [1, 1, 0, 0, 0, 0, 1, 0],
          [1, 0, 0, 0, 0, 0, 1, 1],
          [0, 0, 0, 0, 0, 0, 1, 0],
          [1, 0, 0, 0, 0, 0, 1, 1],
          [1, 0, 0, 0, 0, 0, 1, 0],
          [0, 1, 0, 0, 0, 0, 1, 1],
          [0, 1, 0, 0, 0, 0, 1, 0],
          [1, 1, 0, 0, 0, 0, 1, 1],
          [1, 1, 1, 0, 0, 0, 1, 0],
          [0, 0, 1, 0, 0, 0, 1, 1],
          [0, 0, 1, 0, 0, 0, 1, 0],
          [1, 0, 1, 0, 0, 0, 1, 1],
          [1, 0, 1, 0, 0, 0, 1, 0],
          [0, 1, 1, 0, 0, 0, 1, 1],
          [0, 1, 1, 1, 0, 0, 1, 0],
          [1, 1, 1, 1, 0, 0, 1, 1],
          [1, 1, 0, 1, 0, 0, 1, 0],
          [0, 0, 0, 1, 0, 0, 1, 1],
          [0, 0, 0, 1, 0, 0, 1, 0],
          [1, 0, 0, 1, 0, 0, 1, 1],
          [1, 0, 0, 1, 0, 0, 1, 0],
          [0, 1, 0, 1, 0, 0, 1, 1],
          [0, 1, 0, 1, 0, 0, 1, 0],
          [1, 1, 0, 1, 0, 0, 1, 1],
          [1, 1, 1, 1, 0, 0, 1, 0],
          [0, 0, 1, 1, 0, 0, 1, 1],
          [0, 0, 1, 1, 1, 0, 1, 0],
          [1, 0, 1, 1, 1, 0, 1, 1],
          [1, 0, 1, 1, 1, 0, 1, 0],
          [0, 1, 1, 1, 1, 0, 1, 1],
          [0, 1, 1, 0, 1, 0, 1, 0],
          [1, 1, 1, 0, 1, 0, 1, 1],
          [1, 1, 0, 0, 1, 0, 1, 0],
          [0, 0, 0, 0, 1, 0, 1, 1],
          [0, 0, 0, 0, 1, 0, 1, 0],
          [1, 0, 0, 0, 1, 0, 1, 1],
          [1, 0, 0, 0, 1, 0, 1, 0],
          [0, 1, 0, 0, 1, 0, 1, 1],
          [0, 1, 0, 0, 1, 0, 1, 0],
          [1, 1, 0, 0, 1, 0, 1, 1],
          [1, 1, 1, 0, 1, 0, 1, 0],
          [0, 0, 1, 0, 1, 0, 1, 1],
          [0, 0, 1, 0, 1, 0, 1, 0],
          [1, 0, 1, 0, 1, 0, 1, 1],
          [1, 0, 1, 0, 1, 0, 1, 0],
          [0, 1, 1, 0, 1, 0, 1, 1],
          [0, 1, 1, 1, 1, 0, 1, 0],
          [1, 1, 1, 1, 1, 0, 1, 1],
          [1, 1, 0, 1, 1, 0, 1, 0],
          [0, 0, 0, 1, 1, 0, 1, 1],
          [0, 0, 0, 1, 1, 1, 1, 0],
          [1, 0, 0, 1, 1, 1, 1, 1],
          [1, 0, 0, 1, 1, 1, 1, 0],
          [0, 1, 0, 1, 1, 1, 1, 1],
          [0, 1, 0, 1, 1, 1, 1, 0],
          [1, 1, 0, 1, 1, 1, 1, 1],
          [1, 1, 1, 1, 1, 1, 1, 0],
          [0, 0, 1, 1, 1, 1, 1, 1],
          [0, 0, 1, 1, 0, 1, 1, 0],
          [1, 0, 1, 1, 0, 1, 1, 1],
          [1, 0, 1, 1, 0, 1, 1, 0],
          [0, 1, 1, 1, 0, 1, 1, 1],
          [0, 1, 1, 0, 0, 1, 1, 0],
          [1, 1, 1, 0, 0, 1, 1, 1],
          [1, 1, 0, 0, 0, 1, 1, 0],
          [0, 0, 0, 0, 0, 1, 1, 1],
          [0, 0, 0, 0, 0, 1, 1, 1],
          [1, 0, 0, 0, 0, 1, 1, 0],
          [1, 0, 0, 0, 0, 1, 1, 1],
          [0, 1, 0, 0, 0, 1, 1, 0],
          [0, 1, 0, 0, 0, 1, 1, 1],
          [1, 1, 0, 0, 0, 1, 1, 0],
          [1, 1, 1, 0, 0, 1, 1, 1],
          [0, 0, 1, 0, 0, 1, 1, 0],
          [0, 0, 1, 0, 0, 1, 1, 1],
          [1, 0, 1, 0, 0, 1, 1, 0],
          [1, 0, 1, 0, 0, 1, 1, 1],
          [0, 1, 1, 0, 0, 1, 1, 0],
          [0, 1, 1, 1, 0, 1, 1, 1],
          [1, 1, 1, 1, 0, 1, 1, 0],
          [1, 1, 0, 1, 0, 1, 1, 1],
          [0, 0, 0, 1, 0, 1, 1, 0],
          [0, 0, 0, 1, 0, 1, 1, 1],
          [1, 0, 0, 1, 0, 1, 1, 0],
          [1, 0, 0, 1, 0, 1, 1, 1],
          [0, 1, 0, 1, 0, 1, 1, 0],
          [0, 1, 0, 1, 0, 1, 1, 1],
          [1, 1, 0, 1, 0, 1, 1, 0],
          [1, 1, 1, 1, 0, 1, 1, 1],
          [0, 0, 1, 1, 0, 1, 1, 0],
          [0, 0, 1, 1, 1, 1, 1, 1],
          [1, 0, 1, 1, 1, 1, 1, 0],
          [1, 0, 1, 1, 1, 1, 1, 1],
          [0, 1, 1, 1, 1, 1, 1, 0],
          [0, 1, 1, 0, 1, 1, 1, 1],
          [1, 1, 1, 0, 1, 1, 1, 0],
          [1, 1, 0, 0, 1, 1, 1, 1],
          [0, 0, 0, 0, 1, 1, 1, 0],
          [0, 0, 0, 0, 1, 1, 0, 1],
          [1, 0, 0, 0, 1, 1, 0, 0],
          [1, 0, 0, 0, 1, 1, 0, 1],
          [0, 1, 0, 0, 1, 1, 0, 0],
          [0, 1, 0, 0, 1, 1, 0, 1],
          [1, 1, 0, 0, 1, 1, 0, 0],
          [1, 1, 1, 0, 1, 1, 0, 1],
          [0, 0, 1, 0, 1, 1, 0, 0],
          [0, 0, 1, 0, 1, 1, 0, 1],
          [1, 0, 1, 0, 1, 1, 0, 0],
          [1, 0, 1, 0, 1, 1, 0, 1],
          [0, 1, 1, 0, 1, 1, 0, 0],
          [0, 1, 1, 1, 1, 1, 0, 1],
          [1, 1, 1, 1, 1, 1, 0, 0],
          [1, 1, 0, 1, 1, 1, 0, 1],
          [0, 0, 0, 1, 1, 1, 0, 0],
          [0, 0, 0, 1, 1, 0, 0, 1],
          [1, 0, 0, 1, 1, 0, 0, 0],
          [1, 0, 0, 1, 1, 0, 0, 1],
          [0, 1, 0, 1, 1, 0, 0, 0],
          [0, 1, 0, 1, 1, 0, 0, 1],
          [1, 1, 0, 1, 1, 0, 0, 0],
          [1, 1, 1, 1, 1, 0, 0, 1],
          [0, 0, 1, 1, 1, 0, 0, 0],
          [0, 0, 1, 1, 0, 0, 0, 1],
          [1, 0, 1, 1, 0, 0, 0, 0],
          [1, 0, 1, 1, 0, 0, 0, 1],
          [0, 1, 1, 1, 0, 0, 0, 0],
          [0, 1, 1, 0, 0, 0, 0, 1],
          [1, 1, 1, 0, 0, 0, 0, 0],
          [1, 1, 0, 0, 0, 0, 0, 1],
          [0, 0, 0, 0, 0, 0, 0, 0]
      ])
      if cm is False:
          cm = np.array([
              [1, 1, 0, 0, 0, 0, 0, 1],
              [1, 1, 1, 0, 0, 0, 0, 0],
              [0, 1, 1, 1, 0, 0, 0, 0],
              [0, 0, 1, 1, 1, 0, 0, 0],
              [0, 0, 0, 1, 1, 1, 0, 0],
              [0, 0, 0, 0, 1, 1, 1, 0],
              [0, 0, 0, 0, 0, 1, 1, 1],
              [1, 0, 0, 0, 0, 0, 1, 1]
          ])
      return Network(tpm, connectivity_matrix=cm)