code: def last_dim_log_softmax(tensor, mask=None):
      """
      Takes a tensor with 3 or more dimensions and does a masked log softmax over the last dimension.
      We assume the tensor has shape ``(batch_size, ..., sequence_length)`` and that the mask (if given)
      has shape ``(batch_size, sequence_length)``.
      """
      return _last_dimension_applicator(
          masked_log_softmax, tensor, mask
      )
  
imports: from __future__ import division
  from __future__ import absolute_import
  from collections import defaultdict
  import logging
  import math
  import torch
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 15 for calling a global function with example usage: last_dim_log_softmax(tensor, mask) and returns: _last_dimension_applicator