code: def test_proportional_hazard_test_with_kmf_with_some_censorship_and_weights():
      """
  
      library(survival)
      df <- data.frame(
        "var1" = c(0.209325, 0.693919, 0.443804, 0.065636, 0.386294),
        "T" = c(5.269797, 6.601666, 7.335846, 11.684092, 12.678458),
        "E" = c(1, 1, 1, 0, 1),
        "w" = c(1, 0.5, 2, 1, 1),
      )
  
      c = coxph(formula=Surv(T, E) ~ var1 , data=df, weights=w)
      cox.zph(c, transform='km')
      """
  
      df = pd.DataFrame(
          {
              "var1": [
                  0.209325,
                  0.693919,
                  0.443804,
                  0.065636,
                  0.386294,
              ],
              "T": [5.269797, 6.601666, 7.335846, 11.684092, 12.678458],
              "E": [1, 1, 1, 0, 1],
              "w": [1, 0.5, 5, 1, 1],
          }
      )
  
      cph = CoxPHFitter()
      with pytest.warns(
          StatisticalWarning, match="weights are not integers"
      ):
          cph.fit(df, "T", "E", weights_col="w")
          results = stats.proportional_hazard_test(cph, df)
          npt.assert_allclose(
              results.summary.loc["var1"]["test_statistic"],
              0.916,
              rtol=1e-2,
          )
  
imports: import numpy
  import pandas
  import numpy.testing
  import pytest
  from pandas.testing import assert_frame_equal
  from lifelines import statistics
  from lifelines import CoxPHFitter, KaplanMeierFitter, WeibullFitter
  from lifelines.exceptions import StatisticalWarning
  from lifelines.datasets import load_waltons, load_g3, load_lymphoma, load_dd, load_regression_dataset, load_leukemia
label_desc: Use image node_id 35 for calling a global function with example usage: test_proportional_hazard_test_with_kmf_with_some_censorship_and_weights() without return types