code: def test_sample(self):
      psdf = ps.DataFrame({"A": [0, 2, 4]}, index=["x", "y", "z"])
  
      # Make sure the tests run, but we can't check the result because they are non-deterministic.
      psdf.sample(frac=0.1)
      psdf.sample(frac=0.2, replace=True)
      psdf.sample(frac=0.2, random_state=5)
      psdf["A"].sample(frac=0.2)
      psdf["A"].sample(frac=0.2, replace=True)
      psdf["A"].sample(frac=0.2, random_state=5)
  
      self.assert_eq(
          psdf.sample(frac=0.1, ignore_index=True).index.dtype, np.int64
      )
      self.assert_eq(
          psdf.sample(
              frac=0.2, replace=True, ignore_index=True
          ).index.dtype,
          np.int64,
      )
      self.assert_eq(
          psdf.sample(
              frac=0.2, random_state=5, ignore_index=True
          ).index.dtype,
          np.int64,
      )
      self.assert_eq(
          psdf["A"].sample(frac=0.2, ignore_index=True).index.dtype,
          np.int64,
      )
      self.assert_eq(
          psdf["A"]
          .sample(frac=0.2, replace=True, ignore_index=True)
          .index.dtype,
          np.int64,
      )
      self.assert_eq(
          psdf["A"]
          .sample(frac=0.2, random_state=5, ignore_index=True)
          .index.dtype,
          np.int64,
      )
  
      with self.assertRaises(ValueError):
          psdf.sample()
      with self.assertRaises(NotImplementedError):
          psdf.sample(n=1)
  
imports: import unittest
  import numpy
  import pandas
  from pandas.tseries.offsets import DateOffset
  from pyspark import pandas
  from pyspark.errors import PySparkValueError
  from pyspark.pandas.config import option_context
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 15 for calling the FrameReindexingMixin obj's underlying member method code with example usage: obj.test_sample() without return types