docs: def _shift_or_mirror_into_invertible_i(self, x, i):
          """shift into the invertible domain [lb - ab, ub + au], mirror close to
          boundaries in order to get a smooth transformation everywhere
  
          """
          assert x is not None
          lb = self._lb[self._index(i)]
          ub = self._ub[self._index(i)]
          al = self._al[self._index(i)]
          au = self._au[self._index(i)]
          # x is far from the boundary, compared to ub - lb
          if x < lb - 2 * al - (ub - lb) / 2.0 or x > ub + 2 * au + (ub - lb) / 2.0:
              r = 2 * (ub - lb + al + au)  # period
              s = lb - 2 * al - (ub - lb) / 2.0  # start
              x -= r * ((x - s) // r)  # shift
          if x > ub + au:
              x -= 2 * (x - ub - au)
          if x < lb - al:
              x += 2 * (lb - al - x)
          return x