code: def index_row(a:Union[Collection,pd.DataFrame,pd.Series], idxs:Collection[int])->Any:
      "Return the slice of `a` corresponding to `idxs`."
      if a is None: return a
      if isinstance(a,(pd.DataFrame,pd.Series)):
          res = a.iloc[idxs]
          if isinstance(res,(pd.DataFrame,pd.Series)): return res.copy()
          return res
      return a[idxsf index_row(a:Union[Collection,pd.DataFrame,pd.Series], idxs:Collection[int])->Any:
      "Return the slice of `a` corresponding to `idxs`."
      if a is None: return a
      if isinstance(a,(pd.DataFrame,pd.Series)):
          res = a.iloc[idxs]
          if isinstance(res,(pd.DataFrame,pd.Series)): return res.copy()
          return res
      return a[idxs]
docs: Return the slice of `a` corresponding to `idxs`.