code: def transform(
      self, samples: MultiLabelClassificationLabelVar
  ) -> np.ndarray:
      data = np.zeros((len(samples), len(self.vocab2idx)))
      for sample_index, sample in enumerate(samples):
          for label in sample:
              data[sample_index][self.vocab2idx[label]] = 1
      return data
  
file_path: Kashgari/kashgari/utils/multi_label.py
imports: from typing import List, Dict
  import numpy
  from kashgari.types import MultiLabelClassificationLabelVar
label_desc: Use image node_id 3 for calling the MultiLabelBinarizer obj's underlying member method code with example usage: obj.transform(samples) and returns: data