code: def mtl_path(
      X,
      Y,
      eps=1e-2,
      n_alphas=100,
      alphas=None,
      max_iter=100,
      max_epochs=50_000,
      p0=10,
      verbose=0,
      tol=1e-6,
      prune=True,
      return_thetas=False,
      coef_init=None,
  ):
      X = check_array(
          X,
          "csc",
          dtype=[np.float64, np.float32],
          order="F",
          copy=False,
      )
      Y = check_array(
          Y,
          "csc",
          dtype=[np.float64, np.float32],
          order="F",
          copy=False,
      )
      n_samples, n_features = X.shape
      n_tasks = Y.shape[1]
      if alphas is None:
          alpha_max = np.max(norm(X.T @ Y, ord=2, axis=1)) / n_samples
          alphas = alpha_max * np.geomspace(
              1, eps, n_alphas, dtype=X.dtype
          )
      else:
          alphas = np.sort(alphas)[::-1]
  
      n_alphas = len(alphas)
  
      coefs = np.zeros(
          (n_features, n_tasks, n_alphas), order="F", dtype=X.dtype
      )
  
      thetas = np.zeros((n_alphas, n_samples, n_tasks), dtype=X.dtype)
      gaps = np.zeros(n_alphas)
  
      norms_X_col = np.linalg.norm(X, axis=0)
      Y = np.asfortranarray(Y)
      R = Y.copy(order="F")
      theta = np.zeros_like(Y, order="F")
  
      # do not skip alphas[0], it is not always alpha_max
      for t in range(n_alphas):
          alpha = alphas[t]
  
          if verbose:
              msg = "##### Computing alpha %d/%d" % (t + 1, n_alphas)
              print("#" * len(msg))
              print(msg)
              print("#" * len(msg))
          if t > 0:
              W = coefs[:, :, t - 1].copy()
              p_t = max(len(np.where(W[:, 0] != 0)[0]), p0)
          else:
              if coef_init is not None:
                  W = coef_init.T
                  R = np.asfortranarray(Y - X @ W)
                  p_t = max(len(np.where(W[:, 0] != 0)[0]), p0)
              else:
                  W = np.zeros((n_features, n_tasks), dtype=X.dtype)
                  p_t = 10
  
          sol = celer_mtl(
              X,
              Y,
              alpha,
              W,
              R,
              theta,
              norms_X_col,
              p0=p_t,
              tol=tol,
              prune=prune,
              max_iter=max_iter,
              max_epochs=max_epochs,
              verbose=verbose,
              use_accel=True,
          )
  
          coefs[:, :, t], thetas[t], gaps[t] = sol[0], sol[1], sol[2]
  
      coefs = np.swapaxes(coefs, 0, 1).copy("F")
  
      if return_thetas:
          return alphas, coefs, gaps, thetas
  
      return alphas, coefs, gaps
  
file_path: celer/celer/homotopy.py
imports: import numpy
  from scipy import sparse
  from numpy.linalg import norm
  from sklearn.utils import check_array
  from sklearn.linear_model._base import _preprocess_data
  from .lasso_fast import celer
  from .group_fast import celer_grp, dnorm_grp
  from .cython_utils import compute_norms_X_col, compute_Xw
  from .cython_utils import dnorm_enet
  from .multitask_fast import celer_mtl
  from .PN_logreg import newton_celer
label_desc: Use image node_id 7 for calling a global function with example usage: mtl_path(X, Y, eps, n_alphas, alphas, max_iter, max_epochs, p0, verbose, tol, prune, return_thetas, coef_init) and returns: alphas,  coefs,  gaps, alphas,  coefs,  gaps,  thetas