docs: def zero_pad(matrix, to_length):
      """ Zero pads along the 0th dimension to make sure the utterance array
      x is of length to_length."""
  
      assert matrix.shape[0] <= to_length
      if not matrix.shape[0] <= to_length:
          logger.error("zero_pad cannot be performed on matrix with shape {}"
                       " to length {}".format(matrix.shape[0], to_length))
          raise ValueError
      result = np.zeros((to_length,) + matrix.shape[1:])
      result[:matrix.shape[0]] = matrix
      return result