nodes: 0, module; 1, function_definition; 2, function_name:natural_sort; 3, parameters; 4, block; 5, identifier:item; 6, expression_statement; 7, if_statement; 8, function_definition; 9, return_statement; 10, comment:"""
      Sort strings that contain numbers correctly.
  
      >>> l = ['v1.3.12', 'v1.3.3', 'v1.2.5', 'v1.2.15', 'v1.2.3', 'v1.2.1']
      >>> l.sort(key=natural_sort)
      >>> print l
      "['v1.2.1', 'v1.2.3', 'v1.2.5', 'v1.2.15', 'v1.3.3', 'v1.3.12']"
      """; 11, comparison_operator:item is None; 12, block; 13, function_name:try_int; 14, parameters; 15, block; 16, call; 17, identifier:item; 18, None; 19, return_statement; 20, identifier:s; 21, try_statement; 22, identifier:tuple; 23, argument_list; 24, integer:0; 25, block; 26, except_clause; 27, call; 28, return_statement; 29, identifier:ValueError; 30, block; 31, identifier:map; 32, argument_list; 33, call; 34, return_statement; 35, identifier:try_int; 36, call; 37, identifier:int; 38, argument_list; 39, identifier:s; 40, attribute; 41, argument_list; 42, identifier:s; 43, identifier:re; 44, identifier:findall; 45, string; 46, identifier:item; 47, string_content:(\d+|\D+)
code: def natural_sort(item):
      """
      Sort strings that contain numbers correctly.
  
      >>> l = ['v1.3.12', 'v1.3.3', 'v1.2.5', 'v1.2.15', 'v1.2.3', 'v1.2.1']
      >>> l.sort(key=natural_sort)
      >>> print l
      "['v1.2.1', 'v1.2.3', 'v1.2.5', 'v1.2.15', 'v1.3.3', 'v1.3.12']"
      """
      if item is None:
          return 0
  
      def try_int(s):
          try:
              return int(s)
          except ValueError:
              return s
      return tuple(map(try_int, re.findall(r'(\d+|\D+)', item)))