nodes: 0, module; 1, function_definition; 2, function_name:atoi; 3, parameters; 4, type; 5, block; 6, typed_parameter; 7, generic_type; 8, expression_statement; 9, return_statement; 10, identifier:text; 11, type; 12, identifier:Union; 13, type_parameter; 14, comment:"""
      Converts strings to integers if they're composed of digits; otherwise
      returns the strings unchanged. One way of sorting strings with numbers;
      it will mean that ``"11"`` is more than ``"2"``.
      """; 15, conditional_expression:int(text) if text.isdigit() else text; 16, identifier:str; 17, type; 18, type; 19, call; 20, call; 21, identifier:text; 22, identifier:int; 23, identifier:str; 24, identifier:int; 25, argument_list; 26, attribute; 27, argument_list; 28, identifier:text; 29, identifier:text; 30, identifier:isdigit
code: def atoi(text: str) -> Union[int, str]:
      """
      Converts strings to integers if they're composed of digits; otherwise
      returns the strings unchanged. One way of sorting strings with numbers;
      it will mean that ``"11"`` is more than ``"2"``.
      """
      return int(text) if text.isdigit() else text