nodes: 0, module; 1, function_definition; 2, function_name:natural_sort; 3, parameters; 4, block; 5, identifier:item; 6, expression_statement; 7, expression_statement; 8, return_statement; 9, comment:"""
      Sort strings that contain numbers correctly. Works in Python 2 and 3.
  
      >>> l = ['v1.3.12', 'v1.3.3', 'v1.2.5', 'v1.2.15', 'v1.2.3', 'v1.2.1']
      >>> l.sort(key=natural_sort)
      >>> l.__repr__()
      "['v1.2.1', 'v1.2.3', 'v1.2.5', 'v1.2.15', 'v1.3.3', 'v1.3.12']"
      """; 10, assignment; 11, list_comprehension; 12, identifier:dre; 13, call; 14, conditional_expression:int(s) if s.isdigit() else s.lower(); 15, for_in_clause; 16, attribute; 17, argument_list; 18, call; 19, call; 20, call; 21, identifier:s; 22, call; 23, identifier:re; 24, identifier:compile; 25, string; 26, identifier:int; 27, argument_list; 28, attribute; 29, argument_list; 30, attribute; 31, argument_list; 32, attribute; 33, argument_list; 34, string_content:(\d+); 35, identifier:s; 36, identifier:s; 37, identifier:isdigit; 38, identifier:s; 39, identifier:lower; 40, identifier:re; 41, identifier:split; 42, identifier:dre; 43, identifier:item
code: def natural_sort(item):
      """
      Sort strings that contain numbers correctly. Works in Python 2 and 3.
  
      >>> l = ['v1.3.12', 'v1.3.3', 'v1.2.5', 'v1.2.15', 'v1.2.3', 'v1.2.1']
      >>> l.sort(key=natural_sort)
      >>> l.__repr__()
      "['v1.2.1', 'v1.2.3', 'v1.2.5', 'v1.2.15', 'v1.3.3', 'v1.3.12']"
      """
      dre = re.compile(r'(\d+)')
      return [int(s) if s.isdigit() else s.lower() for s in re.split(dre, item)]