code: def _naive_concordance_summary_statistics(
      event_times, predicted_event_times, event_observed
  ):
      """
      Fallback, simpler method to compute concordance.
  
      """
  
      def _valid_comparison(time_a, time_b, event_a, event_b):
          """True if times can be compared."""
          if time_a == time_b:
              # Ties are only informative if exactly one event happened
              return event_a != event_b
          if event_a and event_b:
              return True
          if event_a and time_a < time_b:
              return True
          if event_b and time_b < time_a:
              return True
          return False
  
      def _concordance_value(
          time_a, time_b, pred_a, pred_b, event_a, event_b
      ):
          if pred_a == pred_b:
              # Same as random
              return (0, 1)
          if pred_a < pred_b:
              return (time_a < time_b) or (
                  time_a == time_b and event_a and not event_b
              ), 0
          # pred_a > pred_b
          return (time_a > time_b) or (
              time_a == time_b and not event_a and event_b
          ), 0
  
      num_pairs = 0.0
      num_correct = 0.0
      num_tied = 0.0
  
      for a, time_a in enumerate(event_times):
          pred_a = predicted_event_times[a]
          event_a = event_observed[a]
          # Don't want to double count
          for b in range(a + 1, len(event_times)):
              time_b = event_times[b]
              pred_b = predicted_event_times[b]
              event_b = event_observed[b]
  
              if _valid_comparison(time_a, time_b, event_a, event_b):
                  num_pairs += 1.0
                  crct, ties = _concordance_value(
                      time_a, time_b, pred_a, pred_b, event_a, event_b
                  )
                  num_correct += crct
                  num_tied += ties
  
      return (num_correct, num_tied, num_pairs)
  
file_path: lifelines/lifelines/utils/concordance.py
imports: import numpy
  from lifelines.utils.btree import _BTree
label_desc: Use image node_id 6 for calling a global function with example usage: _naive_concordance_summary_statistics(event_times, predicted_event_times, event_observed) and returns: num_correct,  num_tied,  num_pairs, False, unknown,  int, unknown, True, True, True, int,  int, unknown,  int