code: def bubble_sort_abs_value(
      points_list: List[Union[float, int]]
  ) -> List[Union[float, int]]:
      r"""Sorts a sequence of grid points by their absolute value.
  
      Sorting is done __in place__. This function is written with numpy, so it can't
      be transformed by JAX.
  
      !!! example
          ```python
          lst = [-3, -2, -1, 0, 1, 2, 3]
          sorted_lst = bubble_sort_abs_value(lst)
          print(sorted_lst)
          # [0, 1, -1, 2, -2, 3, -3]
          ```
  
      Args:
        points_list (List[Union[float, int]]): The grid points to sort.
  
      Returns:
        The sorted grid points.
      """
  
      for i in range(len(points_list)):
          for j in range(0, len(points_list) - i - 1):
              magnitude_condition = abs(points_list[j]) > abs(
                  points_list[j + 1]
              )
              same_mag_condition = abs(points_list[j]) == abs(
                  points_list[j + 1]
              )
              sign_condition = np.sign(points_list[j]) < np.sign(
                  points_list[j + 1]
              )
              if magnitude_condition or (
                  same_mag_condition and sign_condition
              ):
                  temp = points_list[j]
                  points_list[j] = points_list[j + 1]
                  points_list[j + 1] = temp
  
      return points_list
  
imports: from typing import List, Tuple, Union, no_type_check
  import numpy
  from jax import numpy
  from jax import scipy
label_desc: Use image node_id 2 for calling a global function with example usage: bubble_sort_abs_value(points_list) and returns: points_list