code: def create_output_array(
      sequences: Collection,
      max_output_length: int,
      batch_size: int,
      output_dict: Dict,
      end_mark: Any,
  ):
      """Create the array describing the target sequences.
  
      It creates a 2d Matrix empty matrix according to batch size and max_length.
      Then iteratively fills it with the key-values from the output dictionary.
  
      This function is similar to `create_input_array` function. The only
      difference is that it is used for output sequences and does not have the
      `reverse_input` parameter as it is not required for output sequences.
  
      It is used in NLP Models like SeqToSeq where the output is also a sentence
      and we need to convert it into numbers so that the model can do computation
      on them. This function takes in the sentence then using the `output_dict`
      dictionary picks up the words/letters equivalent numerical represntation.
      Then makes an numpy array of it.
  
      These values can be used to generate embeddings for further processing.
  
      Models used in:
  
      * SeqToSeq
  
      Parameters
      ----------
      sequences: Collection
          List of sequences to be converted into output array.
      max_output_length: bool
          Maximum length of output sequence that may be generated
      batch_size: int
          Batch size of the output array.
      output_dict: dict
          Dictionary containing the key-value pairs of output sequences.
      end_mark: Any
          End mark for the output sequences.
  
      Returns
      -------
      features: np.Array
          Numeric Representation of the given sequence according to output_dict.
  
      Examples
      --------
      >>> import deepchem as dc
      >>> # Prepare Data
      >>> inputs = [["a", "b"], ["b", "b", "b"]]
      >>> output_dict = {"c": 0, "a": 1, "b": 2}
      >>> # Inputs property
      >>> max_length = max([len(x) for x in inputs])
      >>> output = dc.utils.batch_utils.create_output_array(inputs, max_length, 2,
      ...                                                   output_dict, "c")
      >>> output.shape
      (2, 3)
  
      """
      lengths = [len(x) for x in sequences]
      labels = np.zeros(
          (batch_size, max_output_length), dtype=np.float32
      )
      for i, sequence in enumerate(sequences):
          for j, token in enumerate(sequence):
              labels[i, j] = output_dict[token]
          for j in range(lengths[i], max_output_length):
              labels[i, j] = output_dict[end_mark]
      return labels
  
imports: import numpy
  from typing import Any, Dict, Collection, List
label_desc: Use image node_id 4 for calling a global function with example usage: create_output_array(sequences, max_output_length, batch_size, output_dict, end_mark) and returns: labels