code: def test__maybe_sample():
      from dtale.ppscore.calculation import _maybe_sample
  
      df = pd.read_csv(
          os.path.join(
              os.path.dirname(__file__), "..", "..", "data/titanic.csv"
          )
      )
      assert len(_maybe_sample(df, 10)) == 10
  
file_path: dtale/tests/dtale/ppscore/test_calculation.py
imports: import os
  import pytest
  import pandas
  import numpy
  import sys
  import dtale.ppscore
  from dtale.pandas_util import check_pandas_version
label_desc: Use image node_id 4 for calling a global function with example usage: test__maybe_sample() without return types