code: def _advance_pattern_generators(self,p):
          valid_generators = []
          for g in p.generators:
              for trial in range(self.max_trials):
                  if np.alltrue([self.__distance_valid(g,v,p) for v in valid_generators]):
                      valid_generators.append(g)
                      break
                  g.force_new_dynamic_value('x')
                  g.force_new_dynamic_value('y')
              else:
                  self.warning("Unable to place pattern %s subject to given constraints" %
                               g.name)
          return valid_generators