nodes: 0, module; 1, function_definition; 2, function_name:combine_adjacent_lines; 3, parameters; 4, block; 5, identifier:line_numbers; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, comment:# Add a terminating value of `None` to list; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, for_statement; 14, return_statement; 15, comment:"""
          Given a sorted collection of line numbers this will
          turn them to strings and combine adjacent values
  
          [1, 2, 5, 6, 100] -> ["1-2", "5-6", "100"]
          """; 16, assignment; 17, assignment; 18, call; 19, assignment; 20, assignment; 21, identifier:line_number; 22, subscript; 23, comment:# If the current number is adjacent to the previous number; 24, block; 25, identifier:combined_list; 26, identifier:combine_template; 27, string:"{0}-{1}"; 28, identifier:combined_list; 29, list; 30, attribute; 31, argument_list; 32, identifier:start; 33, subscript; 34, identifier:end; 35, None; 36, identifier:line_numbers; 37, slice; 38, if_statement; 39, identifier:line_numbers; 40, identifier:append; 41, None; 42, identifier:line_numbers; 43, integer:0; 44, integer:1; 45, comparison_operator:(end if end else start) + 1 == line_number; 46, block; 47, else_clause; 48, binary_operator:(end if end else start) + 1; 49, identifier:line_number; 50, expression_statement; 51, block; 52, parenthesized_expression; 53, integer:1; 54, assignment; 55, if_statement; 56, expression_statement; 57, expression_statement; 58, conditional_expression:end if end else start; 59, identifier:end; 60, identifier:line_number; 61, identifier:end; 62, block; 63, else_clause; 64, assignment; 65, assignment; 66, identifier:end; 67, identifier:end; 68, identifier:start; 69, expression_statement; 70, block; 71, identifier:start; 72, identifier:line_number; 73, identifier:end; 74, None; 75, call; 76, expression_statement; 77, attribute; 78, argument_list; 79, call; 80, identifier:combined_list; 81, identifier:append; 82, call; 83, attribute; 84, argument_list; 85, attribute; 86, argument_list; 87, identifier:combined_list; 88, identifier:append; 89, call; 90, identifier:combine_template; 91, identifier:format; 92, identifier:start; 93, identifier:end; 94, identifier:str; 95, argument_list; 96, identifier:start
code: def combine_adjacent_lines(line_numbers):
          """
          Given a sorted collection of line numbers this will
          turn them to strings and combine adjacent values
  
          [1, 2, 5, 6, 100] -> ["1-2", "5-6", "100"]
          """
          combine_template = "{0}-{1}"
          combined_list = []
  
          # Add a terminating value of `None` to list
          line_numbers.append(None)
          start = line_numbers[0]
          end = None
  
          for line_number in line_numbers[1:]:
              # If the current number is adjacent to the previous number
              if (end if end else start) + 1 == line_number:
                  end = line_number
              else:
                  if end:
                      combined_list.append(combine_template.format(start, end))
                  else:
                      combined_list.append(str(start))
                  start = line_number
                  end = None
          return combined_list