code: def yeojohnson_normmax(x, brack=(-2, 2)):
      """Compute optimal Yeo-Johnson transform parameter for input data, using
      maximum likelihood estimation.
  
      Parameters
      ----------
      x : array_like
          Input array.
      brack : 2-tuple, optional
          The starting interval for a downhill bracket search with
          `optimize.brent`. Note that this is in most cases not critical; the
          final result is allowed to be outside this bracket.
  
      Returns
      -------
      maxlog : float
          The optimal transform parameter found.
  
      Notes
      -----
      .. versionadded:: 1.2.0
  
      See Also
      --------
      yeojohnson, yeojohnson_llf, yeojohnson_normplot
  
      Examples
      --------
      >>> from scipy import stats
      >>> import matplotlib.pyplot as plt
      >>> np.random.seed(1234)  # make this example reproducible
  
      Generate some data and determine optimal ``lmbda``
  
      >>> x = stats.loggamma.rvs(5, size=30) + 5
      >>> lmax = stats.yeojohnson_normmax(x)
  
      >>> fig = plt.figure()
      >>> ax = fig.add_subplot(111)
      >>> prob = stats.yeojohnson_normplot(x, -10, 10, plot=ax)
      >>> ax.axvline(lmax, color='r')
  
      >>> plt.show()
  
      """
  
      def _neg_llf(lmbda, data):
          return -yeojohnson_llf(lmbda, data)
  
      return optimize.brent(_neg_llf, brack=brack, args=(x,))
  
imports: from __future__ import division, print_function, absolute_import
  import math
  import warnings
  from collections import namedtuple
  import numpy
  from numpy import isscalar, r_, log, around, unique, asarray, zeros, arange, sort, amin, amax, any, atleast_1d, sqrt, ceil, floor, array, compress, pi, exp, ravel, count_nonzero, sin, cos, arctan2, hypot
  from scipy._lib.six import string_types
  from scipy import optimize
  from scipy import special
  from .None import statlib
  from .None import stats
  from .stats import find_repeats, _contains_nan
  from .contingency import chi2_contingency
  from .None import distributions
  from ._distn_infrastructure import rv_generic
label_desc: Use image node_id 20 for calling a global function with example usage: yeojohnson_normmax(x, brack) and returns: optimize, unknown