code: def _wiggle_interval(value, wiggle=0.5 ** 44):
      r
      if -wiggle < value < wiggle:
          return 0.0, True
  
      elif wiggle <= value <= 1.0 - wiggle:
          return value, True
  
      elif 1.0 - wiggle < value < 1.0 + wiggle:
          return 1.0, True
  
      else:
          return np.nan, False
docs: r"""Check if ``value`` is in :math:`\left[0, 1\right]`.
  
      Allows a little bit of wiggle room outside the interval. Any value
      within ``wiggle`` of ``0.0` will be converted to ``0.0` and similar
      for ``1.0``.
  
      .. note::
  
         There is also a Fortran implementation of this function, which
         will be used if it can be built.
  
      Args:
          value (float): Value to check in interval.
          wiggle (Optional[float]): The amount of wiggle room around the
              the endpoints ``0.0`` and ``1.0``.
  
      Returns:
          Tuple[float, bool]: Pair of
  
          * The ``value`` if it's in the interval, or ``0`` or ``1``
            if the value lies slightly outside. If the ``value`` is
            too far outside the unit interval, will be NaN.
          * Boolean indicating if the ``value`` is inside the unit interval.