code: def get_constraints(clusters, quota=(1, 1), Nmax=0):
      
      qa, qb = quota
      eclusters = make_range(clusters, extend=-Nmax)
      # (1-based index, cluster score)
      nodes = [(i+1, c[-1]) for i, c in enumerate(eclusters)]
  
      eclusters_x, eclusters_y, scores = zip(*eclusters)
  
      # represents the contraints over x-axis and y-axis
      constraints_x = get_1D_overlap(eclusters_x, qa)
      constraints_y = get_1D_overlap(eclusters_y, qb)
  
      return nodes, constraints_x, constraints_y
docs: Check pairwise cluster comparison, if they overlap then mark edge as conflict