code: def cross_product_matrix(x: torch.Tensor) -> torch.Tensor:
      r"""Return the cross_product_matrix symmetric matrix of a vector.
  
      Args:
          x: The input vector to construct the matrix in the shape :math:`(*, 3)`.
  
      Returns:
          The constructed cross_product_matrix symmetric matrix with shape :math:`(*, 3, 3)`.
      """
      if not x.shape[-1] == 3:
          raise AssertionError(x.shape)
      # get vector compononens
      x0 = x[..., 0]
      x1 = x[..., 1]
      x2 = x[..., 2]
  
      # construct the matrix, reshape to 3x3 and return
      zeros = zeros_like(x0)
      cross_product_matrix_flat = stack(
          [zeros, -x2, x1, x2, zeros, -x0, -x1, x0, zeros], dim=-1
      )
      shape_ = x.shape[:-1] + (3, 3)
      return cross_product_matrix_flat.view(*shape_)
  
label_desc: Use image node_id 1 for calling a global function with example usage: cross_product_matrix(x) and returns: cross_product_matrix_flat