code: def _chisq_test_p_value(U, degrees_freedom) -> float:
      p_value = stats.chi2.sf(U, degrees_freedom)
      return p_value
  
imports: from itertools import combinations
  import warnings
  import numpy
  from scipy import stats
  import pandas
  from lifelines import utils
  from lifelines.utils import group_survival_table_from_events, string_rjustify, format_p_value, format_floats, interpolate_at_times_and_return_pandas, _expected_value_of_survival_up_to_t, _expected_value_of_survival_squared_up_to_t
  from lifelines import KaplanMeierFitter
label_desc: Use image node_id 8 for calling a global function with example usage: _chisq_test_p_value(U, degrees_freedom) and returns: p_value