code: def _n_samples(xs, n, size, rng):
      for i in range(n):
          test = rng.choice(xs, size, False)
          train = np.setdiff1d(xs, test, assume_unique=True)
          yield TTPair(train, test)
  
imports: from collections import namedtuple
  import logging
  from abc import ABC, abstractmethod
  import numpy
  import pandas
  from seedbank import numpy_rng
label_desc: Use image node_id 4 for calling a global function with example usage: _n_samples(xs, n, size, rng) without return types