code: def test_create_turnbull_intervals():
      left, right = zip(
          *([0, 1], [4, 6], [2, 6], [0, 3], [2, 4], [5, 7])
      )
      assert create_turnbull_intervals(left, right) == [
          interval(0, 1),
          interval(2, 3),
          interval(4, 4),
          interval(5, 6),
      ]
  
      left, right = zip(*[(0, 1)])
      assert create_turnbull_intervals(left, right) == [interval(0, 1)]
  
      left, right = zip(*[(-1, 1)])
      assert create_turnbull_intervals(left, right) == [interval(-1, 1)]
  
      left, right = zip(*[(-1, 1), (-2, 2)])
      assert create_turnbull_intervals(left, right) == [interval(-1, 1)]
  
file_path: lifelines/lifelines/tests/test_npmle.py
imports: import pytest
  from lifelines.fitters.npmle import npmle, is_subset, create_turnbull_intervals, interval, reconstruct_survival_function
  from numpy import testing
  from lifelines.datasets import load_mice
  from lifelines import KaplanMeierFitter
  import numpy
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: test_create_turnbull_intervals() without return types