def METHOD_NAME(X, shrinkage):
  """
  Return an objective function with which to find an optimal shrinkage value.
  Optimal is defined as the value which maximizes the likelihood of the
  shrunk covariance, given the data. If the shrunk covariance matrix is not
  positive definite, then the objective function returns negative infinity.
  input:
    X: data matrix (N x P) (N observations, P variables)
    shrinkage: an instance of absract class ShrinkageMethod
  output:
    an objective function suitable the mle_cov function
  """
  # replace missing values (nans) with zeros
  X0 = np.nan_to_num(X)
  # define an objective function, given the data
  objective = lambda alpha: log_likelihood(shrinkage.get_cov(alpha), X0)
  # return the objective function
  return objective