code: def _solve_lstsq_subcols(rhs, lhs, lhs_col_idx):
      """Solves an over-determined linear system for selected LHS columns.
          A batched version of `torch.lstsq`.
      Args:
          rhs: right-hand side vectors
          lhs: left-hand side matrices
          lhs_col_idx: a slice of columns in lhs
      Returns:
          a least-squares solution for lhs * X = rhs
      """
      lhs = lhs.index_select(
          -1, torch.tensor(lhs_col_idx, device=lhs.device).long()
      )
      return torch.matmul(torch.pinverse(lhs), rhs[:, :, None])
  
imports: import warnings
  from typing import NamedTuple, Optional
  import torch
  import torch.nn.functional
  from pytorch3d.ops import points_alignment, utils
label_desc: Use image node_id 10 for calling a global function with example usage: _solve_lstsq_subcols(rhs, lhs, lhs_col_idx) and returns: torch