nodes: 0, module; 1, function_definition; 2, function_name:_distance_squared; 3, parameters; 4, type; 5, block; 6, identifier:self; 7, typed_parameter; 8, generic_type; 9, expression_statement; 10, return_statement; 11, identifier:p2; 12, type; 13, identifier:Union; 14, type_parameter; 15, comment:""" Function used to not take the square root as the distances will stay proportionally the same. This is to speed up the sorting process. """; 16, binary_operator:(self[0] - p2[0]) ** 2 + (self[1] - p2[1]) ** 2; 17, string:"Point2"; 18, type; 19, type; 20, binary_operator:(self[0] - p2[0]) ** 2; 21, binary_operator:(self[1] - p2[1]) ** 2; 22, identifier:int; 23, identifier:float; 24, parenthesized_expression; 25, integer:2; 26, parenthesized_expression; 27, integer:2; 28, binary_operator:self[0] - p2[0]; 29, binary_operator:self[1] - p2[1]; 30, subscript; 31, subscript; 32, subscript; 33, subscript; 34, identifier:self; 35, integer:0; 36, identifier:p2; 37, integer:0; 38, identifier:self; 39, integer:1; 40, identifier:p2; 41, integer:1
code: def _distance_squared(self, p2: "Point2") -> Union[int, float]:
          """ Function used to not take the square root as the distances will stay proportionally the same. This is to speed up the sorting process. """
          return (self[0] - p2[0]) ** 2 + (self[1] - p2[1]) ** 2