code: def is_single_tree(data_wrapper):
      '''Check that data forms a single tree
  
      Only the first point has ID of -1.
  
      Returns:
          CheckResult with result and list of IDs
  
      Note:
          This assumes no_missing_parents passed.
      '''
      db = data_wrapper.data_block
      bad_ids = db[db[:, COLS.P] == -1][1:, COLS.ID]
      return CheckResult(len(bad_ids) == 0, bad_ids.tolist()f is_single_tree(data_wrapper):
      '''Check that data forms a single tree
  
      Only the first point has ID of -1.
  
      Returns:
          CheckResult with result and list of IDs
  
      Note:
          This assumes no_missing_parents passed.
      '''
      db = data_wrapper.data_block
      bad_ids = db[db[:, COLS.P] == -1][1:, COLS.ID]
      return CheckResult(len(bad_ids) == 0, bad_ids.tolist())
docs: Check that data forms a single tree
  
      Only the first point has ID of -1.
  
      Returns:
          CheckResult with result and list of IDs
  
      Note:
          This assumes no_missing_parents passed.