code: def evaluate_inverse(
          distribution,
          u_data,
          cache=None,
          parameters=None
  ):
      
      if cache is None:
          cache = {}
      out = numpy.zeros(u_data.shape)
  
      # Distribution self know how to handle inverse Rosenblatt.
      if hasattr(distribution, "_ppf"):
          parameters = load_parameters(
              distribution, "_ppf", parameters=parameters, cache=cache)
          out[:] = distribution._ppf(u_data.copy(), **parameters)
  
      # Approximate inverse Rosenblatt based on cumulative distribution function.
      else:
          from .. import approximation
          parameters = load_parameters(
              distribution, "_cdf", parameters=parameters, cache=cache)
          out[:] = approximation.approximate_inverse(
              distribution, u_data.copy(), cache=cache.copy(), parameters=parameters)
  
      # Store cache.
      cache[distribution] = out
  
      return out
docs: Evaluate inverse Rosenblatt transformation.
  
      Args:
          distribution (Dist):
              Distribution to evaluate.
          u_data (numpy.ndarray):
              Locations for where evaluate inverse transformation distribution at.
          parameters (:py:data:typing.Any):
              Collection of parameters to override the default ones in the
              distribution.
          cache (:py:data:typing.Any):
              A collection of previous calculations in case the same distribution
              turns up on more than one occasion.
  
      Returns:
          The cumulative distribution values of ``distribution`` at location
          ``u_data`` using parameters ``parameters``.