code: def TruncatedNormal(shape, dtype, seed):
      
      if seed:
          np.random.seed(seed)
      n = reduce(mul, shape)
      r = np.empty(n, dtype=dtype_map[dtype])
      idxs = np.ones(n, dtype=np.bool)
      while n:
          r[idxs] = np.random.normal(size=n)
          idxs = np.abs(r) > 2
          n = np.sum(idxs)
      return r.reshape(shape),
docs: Standard (mu=0, sigma=1) gaussian op with truncation above 2 sigma.