code: def test_one_hot_encodings(dummy_class_map_elaborate, label_ids):
      rec = BaseRecord(
          [ClassificationLabelsRecordComponent(is_multilabel=True)]
      )
      rec.classification.set_class_map(dummy_class_map_elaborate)
      rec.classification.set_labels_by_id(label_ids)
  
      assert all(rec.classification._autofix().values())
  
      # Ensure we have the correct no. of labels and that they are indeed
      # one-hot encoded
      one_hot_values = rec.classification.one_hot_encoded()
      assert one_hot_values.sum() == len(label_ids)
      assert np.unique(one_hot_values).tolist() == [0, 1]
  
imports: import pytest
  from icevision.all import *
label_desc: Use image node_id 5 for calling a global function with example usage: test_one_hot_encodings(dummy_class_map_elaborate, label_ids) without return types