code: def execute(cls, ctx, op: "DataFramePSRSGroupbySample"):
      a = ctx[op.inputs[0].key][0]
      xdf = pd if isinstance(a, (pd.DataFrame, pd.Series)) else cudf
      if (
          isinstance(a, xdf.Series)
          and op.output_types[0] == OutputType.dataframe
      ):
          a = _series_to_df(a, xdf)
  
      n = op.n_partition
      if a.shape[0] < n:
          num = n // a.shape[0] + 1
          a = xdf.concat([a] * num).sort_index()
  
      w = a.shape[0] * 1.0 / (n + 1)
  
      slc = np.linspace(
          max(w - 1, 0), a.shape[0] - 1, num=n, endpoint=False
      ).astype(int)
  
      out = a.iloc[slc]
      if op.output_types[0] == OutputType.series and out.ndim == 2:
          assert out.shape[1] == 1
          out = out.iloc[:, 0]
      ctx[op.outputs[-1].key] = out
  
imports: import numpy
  import pandas
  from ...None import opcodes
  from ...core import OutputType
  from ...core.operand import MapReduceOperand, OperandStage
  from ...serialization.serializables import Int32Field, ListField
  from ...utils import lazy_import
  from ..operands import DataFrameOperandMixin
  from ..sort.psrs import DataFramePSRSChunkOperand
label_desc: Use image node_id 2 for calling the DataFramePSRSGroupbySample obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types