code: def _random_subset(seq, m, rng):
      """Return m unique elements from seq.
  
      This differs from random.sample which can return repeated
      elements if seq holds repeated elements.
  
      Note: rng is a random.Random or numpy.random.RandomState instance.
      """
      targets = set()
      while len(targets) < m:
          x = rng.choice(seq)
          targets.add(x)
      return targets
  
imports: import itertools
  import math
  from collections import defaultdict
  import networkx
  from networkx.utils import py_random_state
  from .classic import complete_graph, empty_graph, path_graph, star_graph
  from .degree_seq import degree_sequence_tree
label_desc: Use image node_id 9 for calling a global function with example usage: _random_subset(seq, m, rng) and returns: targets