code: def test_check_frac_to_plot():
      valid_values = [0.5, 0.1, 1, 10]
      for frac in valid_values:
          _check_frac_to_plot(frac)
  
      with pytest.raises(
          ValueError,
          match="frac_to_plot: should in range\\(0, 1\\) when it is a float",
      ):
          _check_frac_to_plot(0.0)
      with pytest.raises(
          ValueError,
          match="frac_to_plot: should in range\\(0, 1\\) when it is a float",
      ):
          _check_frac_to_plot(-0.1)
      with pytest.raises(
          ValueError, match="frac_to_plot: should be larger than 0."
      ):
          _check_frac_to_plot(0)
      with pytest.raises(
          ValueError, match="frac_to_plot: should be float or integer"
      ):
          _check_frac_to_plot("invalid")
  
imports: import pandas
  import numpy
  import pytest
  from pdpbox.utils import FeatureInfo, _to_rgba, _check_col, _check_dataset, _make_list, _check_model, _check_classes, _check_memory_limit, _check_frac_to_plot, _calc_n_jobs, _get_string, _expand_params_for_interact, _calc_preds, _check_cluster_params, _check_plot_engine, _check_pdp_interact_plot_type
label_desc: Use image node_id 7 for calling a global function with example usage: test_check_frac_to_plot() without return types