def _random_subset(seq, m):
 targets = set()
 while (len(targets) < m):
  x = random.choice(seq)
  targets.add(x)
 return targets

def _random_subset ( seq , m ) : targets = set ( ) while ( len ( targets ) < m ) : x = random . choice ( seq ) targets . add ( x ) return targets
return m unique elements from seq .