code: def CRRAutility_inv(u, gam):
      '''
      Evaluates the inverse of the CRRA utility function (with risk aversion para-
      meter gam) at a given utility level u.
  
      Parameters
      ----------
      u : float
          Utility value
      gam : float
          Risk aversion
  
      Returns
      -------
      (unnamed) : float
          Consumption corresponding to given utility value
      '''
      if gam == 1:
          return np.exp(u)
      else:
          return( ((1.0-gam)*u)**(1/(1.0-gam)) f CRRAutility_inv(u, gam):
      '''
      Evaluates the inverse of the CRRA utility function (with risk aversion para-
      meter gam) at a given utility level u.
  
      Parameters
      ----------
      u : float
          Utility value
      gam : float
          Risk aversion
  
      Returns
      -------
      (unnamed) : float
          Consumption corresponding to given utility value
      '''
      if gam == 1:
          return np.exp(u)
      else:
          return( ((1.0-gam)*u)**(1/(1.0-gam)) )
docs: Evaluates the inverse of the CRRA utility function (with risk aversion para-
      meter gam) at a given utility level u.
  
      Parameters
      ----------
      u : float
          Utility value
      gam : float
          Risk aversion
  
      Returns
      -------
      (unnamed) : float
          Consumption corresponding to given utility value