code: def tune_everything(self, x0squared, c, t, gmin, gmax):
      del t
      # First tune based on dynamic range
      if c == 0:
          dr = gmax / gmin
          mustar = ((np.sqrt(dr) - 1) / (np.sqrt(dr) + 1)) ** 2
          alpha_star = (1 + np.sqrt(mustar)) ** 2 / gmax
  
          return alpha_star, mustar
  
      dist_to_opt = x0squared
      grad_var = c
      max_curv = gmax
      min_curv = gmin
      const_fact = dist_to_opt * min_curv**2 / 2 / grad_var
      coef = [-1, 3, -(3 + const_fact), 1]
      roots = np.roots(coef)
      roots = roots[np.real(roots) > 0]
      roots = roots[np.real(roots) < 1]
      root = roots[np.argmin(np.imag(roots))]
  
      assert root > 0 and root < 1 and np.absolute(root.imag) < 1e-6
  
      dr = max_curv / min_curv
      assert max_curv >= min_curv
      mu = max(((np.sqrt(dr) - 1) / (np.sqrt(dr) + 1)) ** 2, root**2)
  
      lr_min = (1 - np.sqrt(mu)) ** 2 / min_curv
  
      alpha_star = lr_min
      mustar = mu
  
      return alpha_star, mustar
  
file_path: tensor2tensor/tensor2tensor/utils/yellowfin_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.utils.yellowfin import YellowFinOptimizer
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the YellowFinTest obj's underlying member method code with example usage: obj.tune_everything(x0squared, c, t, gmin, gmax) and returns: alpha_star,  mustar, alpha_star,  mustar