code: def prepare_table(table):
      
      n = len(table)
      for i, row in enumerate(table):
          assert len(row) == n
          for j, el in enumerate(row):
              if i == j:
                  table[i][i] = 0.0
              elif i > j:
                  table[i][j] = 1-table[j][i]
      return table
docs: Make the table 'symmetric' where the lower left part of the matrix is
         the reverse probability