docs: def probConn (self, preCellsTags, postCellsTags, connParam):
      from .. import sim
  
      ''' Generates connections between all pre and post-syn cells based on probability values'''
      if sim.cfg.verbose: print('Generating set of probabilistic connections (rule: %s) ...' % (connParam['label']))
  
      allRands = self.generateRandsPrePost(preCellsTags, postCellsTags)
  
      # get list of params that have a lambda function
      paramsStrFunc = [param for param in [p+'Func' for p in self.connStringFuncParams] if param in connParam]
  
      # copy the vars into args immediately and work out which keys are associated with lambda functions only once per method
      funcKeys = {}
      for paramStrFunc in paramsStrFunc:
          connParam[paramStrFunc + 'Args'] = connParam[paramStrFunc + 'Vars'].copy()
          funcKeys[paramStrFunc] = [key for key in connParam[paramStrFunc + 'Vars'] if callable(connParam[paramStrFunc + 'Vars'][key])]
  
      # probabilistic connections with disynapticBias (deprecated)
      if isinstance(connParam.get('disynapticBias', None), Number):  
          allPreGids = sim._gatherAllCellConnPreGids()
          prePreGids = {gid: allPreGids[gid] for gid in preCellsTags}
          postPreGids = {gid: allPreGids[gid] for gid in postCellsTags}
          
          probMatrix = {(preCellGid,postCellGid): connParam['probabilityFunc'][preCellGid,postCellGid] if 'probabilityFunc' in connParam else connParam['probability']
                                              for postCellGid,postCellTags in postCellsTags.items() # for each postsyn cell
                                              for preCellGid, preCellTags in preCellsTags.items()  # for each presyn cell
                                              if postCellGid in self.gid2lid}  # check if postsyn is in this node
          
          connGids = self._disynapticBiasProb2(probMatrix, allRands, connParam['disynapticBias'], prePreGids, postPreGids)
          for preCellGid, postCellGid in connGids:
              for paramStrFunc in paramsStrFunc: # call lambda functions to get weight func args
                  connParam[paramStrFunc+'Args'] = {k:v if isinstance(v, Number) else v(preCellsTags[preCellGid],postCellsTags[postCellGid]) for k,v in connParam[paramStrFunc+'Vars'].items()}  
              self._addCellConn(connParam, preCellGid, postCellGid) # add connection
  
      # standard probabilistic conenctions   
      else:
          # calculate the conn preGids of the each pre and post cell
          # for postCellGid,postCellTags in sorted(postCellsTags.items()):  # for each postsyn cell
          for postCellGid,postCellTags in postCellsTags.items():  # for each postsyn cell  # for each postsyn cell
              if postCellGid in self.gid2lid:  # check if postsyn is in this node
                  for preCellGid, preCellTags in preCellsTags.items(): # for each presyn cell
                      probability = connParam['probabilityFunc'][preCellGid,postCellGid] if 'probabilityFunc' in connParam else connParam['probability']
                      if probability >= allRands[preCellGid,postCellGid]:
                          for paramStrFunc in paramsStrFunc: # call lambda functions to get weight func args
                              # update the relevant FuncArgs dict where lambda functions are known to exist in the corresponding FuncVars dict
                              for funcKey in funcKeys[paramStrFunc]:
                                  connParam[paramStrFunc + 'Args'][funcKey] = connParam[paramStrFunc + 'Vars'][funcKey](preCellTags, postCellTags)
                              # connParam[paramStrFunc+'Args'] = {k:v if isinstance(v, Number) else v(preCellTags,postCellTags) for k,v in connParam[paramStrFunc+'Vars'].items()}
                          self._addCellConn(connParam, preCellGid, postCellGid)