code: def outer(tensors):
      """Returns a generalized outer product of the two tensors
  
      Parameters
      ----------
      tensor1 : tensor
          of shape (J1, ..., JN)
      tensor2 : tensor
          of shape (K1, ..., KM)
  
      Returns
      -------
      outer product of tensor1 and tensor2
          of shape (J1, ..., JN, K1, ..., KM)
      """
      for i, tensor in enumerate(tensors):
          if i:
              shape = tl.shape(tensor)
              s1 = len(shape)
  
              shape_1 = shape_res + (1,) * s1
              shape_2 = (1,) * sres + shape
  
              res = tl.reshape(res, shape_1) * tl.reshape(
                  tensor, shape_2
              )
          else:
              res = tensor
  
          shape_res = tl.shape(res)
          sres = len(shape_res)
  
      return res
  
label_desc: Use image node_id 2 for calling a global function with example usage: outer(tensors) and returns: res