code: def _one_hot(x, k, dtype=np.float32):
      """Create a one-hot encoding of x of size k."""
      return np.array(x[:, None] == np.arange(k), dtype)
  
file_path: PySyft/notebooks/tutorials/model-training/mnist_dataset.py
imports: import array
  import gzip
  import os
  from os import path
  import struct
  import urllib.request
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _one_hot(x, k, dtype) and returns: np