code: def _need_reduce_last_dim(ufeat, efeat):
      """Indicates whether to reduce the last dimension on edges
      in the backward pass of spmm,
      if so, use dot instead of mul."""
      ushp = ufeat.shape
      eshp = efeat.shape
      return ushp[1:-1] == eshp[1:-1] and eshp[-1] == 1 and ushp[-1] > 1
  
imports: import numpy
  import tensorflow
  from ..._sparse_ops import _bwd_segment_cmp, _csrmask, _csrmm, _csrsum, _gsddmm, _gspmm, _scatter_add, _segment_reduce
  from ...base import ALL, is_all
  from ...heterograph_index import create_unitgraph_from_csr
  from .tensor import asnumpy, context, copy_to, tensor, zerocopy_from_numpy
label_desc: Use image node_id 4 for calling a global function with example usage: _need_reduce_last_dim(ufeat, efeat) and returns: unknown