code: def _compute_adaptation(self, xyz, xyz_w, f_l, d):
          
          # Transform input colors to cone responses
          rgb = self._xyz_to_rgb(xyz)
          logger.debug("RGB: {}".format(rgb))
  
          rgb_b = self._xyz_to_rgb(self._xyz_b)
          rgb_w = self._xyz_to_rgb(xyz_w)
          rgb_w = Hunt.adjust_white_for_scc(rgb, rgb_b, rgb_w, self._p)
          logger.debug("RGB_W: {}".format(rgb_w))
  
          # Compute adapted tristimulus-responses
          rgb_c = self._white_adaption(rgb, rgb_w, d)
          logger.debug("RGB_C: {}".format(rgb_c))
          rgb_cw = self._white_adaption(rgb_w, rgb_w, d)
          logger.debug("RGB_CW: {}".format(rgb_cw))
  
          # Convert adapted tristimulus-responses to Hunt-Pointer-Estevez fundamentals
          rgb_p = self._compute_hunt_pointer_estevez_fundamentals(rgb_c)
          logger.debug("RGB': {}".format(rgb_p))
          rgb_wp = self._compute_hunt_pointer_estevez_fundamentals(rgb_cw)
          logger.debug("RGB'_W: {}".format(rgb_wp))
  
          # Compute post-adaptation non-linearities
          rgb_ap = self._compute_nonlinearities(f_l, rgb_p)
          rgb_awp = self._compute_nonlinearities(f_l, rgb_wp)
  
          return rgb_ap, rgb_awp
docs: Modified adaptation procedure incorporating simultaneous chromatic contrast from Hunt model.
  
          :param xyz: Stimulus XYZ.
          :param xyz_w: Reference white XYZ.
          :param f_l: Luminance adaptation factor
          :param d: Degree of adaptation.
          :return: Tuple of adapted rgb and rgb_w arrays.