I see, my bad. Just noticed that.
This should help, then.
from torchvision.datasets import EMNIST

emnist = EMNIST(root='./emnist_data/', split = 'letters', train=True, transform=None, download=True)

def sample_class(class_id, N):
  selection = emnist.data[emnist.targets == class_id]
  indexes = np.arange(len(selection))
  np.random.shuffle(indexes)

  return selection[indexes[:N]]