code: def test_encode_label():
      label = 3
      nb_classes = 10
      encoded = rdd_utils.encode_label(label, nb_classes)
      assert len(encoded) == nb_classes
      for i in range(10):
          if i == label:
              assert encoded[i] == 1
          else:
              assert encoded[i] == 0
  
file_path: elephas/tests/utils/test_rdd_utils.py
imports: import numpy
  from elephas.utils import rdd_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_encode_label() without return types