code: def outer(a, b):
      if a.ndim > 1 and b.ndim > 1:
          return _np.einsum("...i,...j->...ij", a, b)
  
      out = _np.multiply.outer(a, b)
      if b.ndim > 1:
          out = out.swapaxes(0, -2)
  
      return out
  
imports: from ._dispatch import BACKEND_NAME, _common
  from ._dispatch import numpy
label_desc: Use image node_id 25 for calling a global function with example usage: outer(a, b) and returns: out, _np