code: def sample(
      self,
      *,
      fraction: typing.Optional[float] = None,
      num: typing.Optional[int] = None,
      seed=None,
  ):
      if fraction is not None:
          return from_rdd(
              self._rdd.sample(
                  fraction=fraction, withReplacement=False, seed=seed
              )
          )
  
      if num is not None:
          return from_rdd(_exactly_sample(self._rdd, num, seed=seed))
  
      raise ValueError(
          f"exactly one of `fraction` or `num` required, fraction={fraction}, num={num}"
      )
  
imports: import logging
  import struct
  import typing
  from typing import Callable, Iterable, Tuple, Optional, Any
  import pyspark
  from pyspark.rddsampler import RDDSamplerBase
  from fate.arch import URI
  from fate.arch.computing.api import KVTable, ComputingEngine, K, V
  from fate.arch.computing.api._table import _lifted_reduce_to_serdes, get_serdes_by_type
  from ._materialize import materialize, unmaterialize
label_desc: Use image node_id 16 for calling the Table obj's underlying member method code with example usage: obj.sample() and returns: from_rdd, from_rdd