code: def connectionist_temporal_classification(
      x,
      t,
      blank_symbol,
      input_length=None,
      label_length=None,
      reduce="mean",
  ):
      """Connectionist Temporal Classification loss function.
  
      Connectionist Temporal Classification(CTC) [Graves2006]_ is a loss function
      of sequence labeling where the alignment between the inputs and target is
      unknown. See also [Graves2012]_
  
      The output is a variable whose value depends on the value of
      the option ``reduce``. If it is ``'no'``, it holds the samplewise
      loss values. If it is ``'mean'``, it takes the mean of loss values.
  
  
      Args:
          x (list or tuple of :class:`~chainer.Variable`):
              A list of unnormalized probabilities for labels.
              Each element of ``x``, ``x[i]`` is a :class:`~chainer.Variable`
              object, which has shape ``(B, V)``, where ``B``
              is the batch size and ``V`` is the number of labels.
              The softmax of ``x[i]`` represents the probabilities of the labels
              at time ``i``.
          t (:class:`~chainer.Variable` or :ref:`ndarray`):
              A matrix including expected label sequences.
              Its shape is ``(B, M)``, where ``B`` is the batch size and ``M`` is
              the maximum length of the label sequences.
              All elements in ``t`` must be less than ``V``, the number of
              labels.
          blank_symbol (int): Index of blank_symbol.
              This value must be non-negative.
          input_length (:class:`~chainer.Variable` or :ref:`ndarray`):
              Length of sequence for each of mini batch ``x`` (optional).
              Its shape must be ``(B,)``.
              If the ``input_length`` is omitted or ``None``, it assumes that
              all of ``x`` is valid input.
          label_length (:class:`~chainer.Variable` or :ref:`ndarray`):
              Length of sequence for each of mini batch ``t`` (optional).
              Its shape must be ``(B,)``.
              If the ``label_length`` is omitted or ``None``, it assumes that
              all of ``t`` is valid input.
          reduce (str): Reduction option. Its value must be either
              ``'mean'`` or ``'no'``. Otherwise,
              :class:`ValueError` is raised.
  
      Returns:
         ~chainer.Variable:
             A variable holding a scalar value of the CTC loss.
             If ``reduce`` is ``'no'``, the output variable holds array
             whose shape is `(B,)` where `B` is the number of samples.
             If it is ``'mean'``, it holds a scalar.
  
      .. note::
         You need to input ``x`` without applying to activation functions(e.g.
         softmax function), because this function applies softmax functions
         to ``x`` before calculating CTC loss to avoid numerical limitations.
         You also need to apply softmax function to forwarded values before you
         decode it.
  
      .. note::
         This function is differentiable only by ``x``.
  
      .. note::
         This function supports (batch, sequence, 1-dimensional input)-data.
  
      .. [Graves2006] Alex Graves, Santiago Fernandez,
         Faustino Gomez, Jurgen Schmidhuber,
         `Connectionist Temporal Classification: Labelling Unsegmented
         Sequence Data with Recurrent Neural Networks
         <ftp://ftp.idsia.ch/pub/juergen/icml2006.pdf>`_
  
      .. [Graves2012] Alex Graves,
         `Supervised Sequence Labelling with Recurrent Neural Networks
         <https://www.cs.toronto.edu/~graves/preprint.pdf>`_
  
      """
      if not isinstance(x, collections_abc.Sequence):
          raise TypeError("x must be a list of Variables")
      if not isinstance(blank_symbol, int):
          raise TypeError("blank_symbol must be non-negative integer.")
      assert 0 <= blank_symbol < x[0].shape[1]
      # This implementation only supports 1-dimensional data.
      # TODO(jnishi): Support d(>1)-dimensional inputs.
      assert x[0].ndim == 2
  
      xp = backend.get_array_module(x[0])
      if input_length is None:
          input_length = xp.full(len(x[0]), len(x), dtype=numpy.int32)
      if label_length is None:
          label_length = xp.full(len(t), t.shape[1], dtype=numpy.int32)
  
      return ConnectionistTemporalClassification(blank_symbol, reduce)(
          input_length, label_length, t, chainer.functions.stack(x)
      )
  
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function
  from chainer import utils
  from chainer.utils import collections_abc
  from chainer.utils import type_check
label_desc: Use image node_id 7 for calling a global function with example usage: connectionist_temporal_classification(x, t, blank_symbol, input_length, label_length, reduce) and returns: ConnectionistTemporalClassification