code: def test_given_sample():
      X = Die("X", 6)
      scipy = import_module("scipy")
      if not scipy:
          skip("Scipy is not installed. Abort tests")
      assert sample(X, X > 5) == 6
  
file_path: sympy/sympy/stats/sampling/tests/test_sample_finite_rv.py
imports: from sympy.core.numbers import Rational
  from sympy.core.singleton import S
  from sympy.external import import_module
  from sympy.stats import Binomial, sample, Die, FiniteRV, DiscreteUniform, Bernoulli, BetaBinomial, Hypergeometric, Rademacher
  from sympy.testing.pytest import skip, raises
label_desc: Use image node_id 1 for calling a global function with example usage: test_given_sample() without return types