Function to be implemented by the user

usermb_next_minibatch(usermb_source, num_samples, num_workers, worker_rank,
  device = NULL)