docs: def shareWeights(self, network, listOfLayerNamePairs = None):
          """
          Share weights with another network. Connection
          is broken after a randomize or change of size. Layers must have the same
          names and sizes for shared connections in both networks.
  
          Example: net.shareWeights(otherNet, [["hidden", "output"]])
  
          This example will take the weights between the hidden and output layers
          of otherNet and share them with net. Also, the bias values of
          otherNet["output"] will be shared with net["output"].
  
          If no list is given, will share all weights.
          """
          if listOfLayerNamePairs == None:
              listOfLayerNamePairs = []
              for c in self.connections:
                  listOfLayerNamePairs.append( [c.fromLayer.name, c.toLayer.name] )
          if self.verbosity > 1:
              print("sharing weights:", self.name, listOfLayerNamePairs)
          # first, check to see if this will work:
          count = 0
          for (fromLayerName, toLayerName) in listOfLayerNamePairs:
              for c1 in range(len(self.connections)):
                  if self.connections[c1].fromLayer.name == fromLayerName and \
                         self.connections[c1].toLayer.name == toLayerName:
                      for c2 in range(len(network.connections)):
                          if network.connections[c2].fromLayer.name == fromLayerName and \
                                 network.connections[c2].toLayer.name == toLayerName:
                              if (self.connections[c1].fromLayer.size != network.connections[c2].fromLayer.size) or \
                                 (self.connections[c1].toLayer.size != network.connections[c2].toLayer.size):
                                  raise AttributeError("shareSomeWeights: layer sizes did not match")
                              count += 1
          if count != len(listOfLayerNamePairs):
              raise AttributeError("shareSomeWeights: layer names did not match")
          # ok, now let's share!
          self.sharedWeights = 1
          network.sharedWeights = 1
          for (fromLayerName, toLayerName) in listOfLayerNamePairs:
              for c1 in range(len(self.connections)):
                  if self.connections[c1].fromLayer.name == fromLayerName and \
                         self.connections[c1].toLayer.name == toLayerName:
                      for c2 in range(len(network.connections)):
                          if network.connections[c2].fromLayer.name == fromLayerName and \
                                 network.connections[c2].toLayer.name == toLayerName:
                              self.connections[c1].weight = network.connections[c2].weight
          for (fromLayerName, toLayerName) in listOfLayerNamePairs:
              for l1 in range(len(self.layers)):
                  if self.layers[l1].name == toLayerName:
                      for l2 in range(len(network.layers)):
                          if network.layers[l2].name == toLayerName:
                              self.layers[l1].weight = network.layers[l2].weight