code: def _ms_fit(indexed_params, estimator, n_features, graph, prng):
      # unpack params
      index, (alpha, grid_point) = indexed_params
  
      # draw a new fixed graph for alpha
      cov, prec, adj = graph.create(n_features, alpha)
  
      # model selection (once per n_samples grid point)
      n_samples = int(grid_point * n_features)
      X = _sample_mvn(n_samples, cov, prng)
      ms_estimator = clone(estimator)
      ms_estimator.fit(X)
  
      return index, ((cov, prec, adj), ms_estimator.lam_, n_samples)
  
file_path: skggm/inverse_covariance/profiling/monte_carlo_profile.py
imports: from __future__ import absolute_import
  import numpy
  from functools import partial
  from sklearn.base import clone
  from joblib import Parallel, delayed
  from .metrics import error_fro
  from .erdos_renyi_graph import ErdosRenyiGraph
  from ..None import QuicGraphicalLasso, QuicGraphicalLassoCV
label_desc: Use image node_id 2 for calling a global function with example usage: _ms_fit(indexed_params, estimator, n_features, graph, prng) and returns: index,  cov,  prec,  adj,  ms_estimator,  n_samples