code: def _fit_coordinate_descent(
      X,
      W,
      H,
      tol=1e-4,
      max_iter=200,
      alpha=0.001,
      l1_ratio=0.0,
      regularization=None,
      update_H=True,
      verbose=0,
      shuffle=False,
      random_state=None,
  ):
      """Compute Non-negative Matrix Factorization (NMF) with Coordinate Descent
  
      The objective function is minimized with an alternating minimization of W
      and H. Each minimization is done with a cyclic (up to a permutation of the
      features) Coordinate Descent.
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          Constant matrix.
  
      W : array-like, shape (n_samples, n_components)
          Initial guess for the solution.
  
      H : array-like, shape (n_components, n_features)
          Initial guess for the solution.
  
      tol : float, default: 1e-4
          Tolerance of the stopping condition.
  
      max_iter : integer, default: 200
          Maximum number of iterations before timing out.
  
      alpha : double, default: 0.
          Constant that multiplies the regularization terms.
  
      l1_ratio : double, default: 0.
          The regularization mixing parameter, with 0 <= l1_ratio <= 1.
          For l1_ratio = 0 the penalty is an L2 penalty.
          For l1_ratio = 1 it is an L1 penalty.
          For 0 < l1_ratio < 1, the penalty is a combination of L1 and L2.
  
      regularization : 'both' | 'components' | 'transformation' | None
          Select whether the regularization affects the components (H), the
          transformation (W), both or none of them.
  
      update_H : boolean, default: True
          Set to True, both W and H will be estimated from initial guesses.
          Set to False, only W will be estimated.
  
      verbose : integer, default: 0
          The verbosity level.
  
      shuffle : boolean, default: False
          If true, randomize the order of coordinates in the CD solver.
  
      random_state : integer seed, RandomState instance, or None (default)
          Random number generator seed control.
  
      Returns
      -------
      W : array-like, shape (n_samples, n_components)
          Solution to the non-negative least squares problem.
  
      H : array-like, shape (n_components, n_features)
          Solution to the non-negative least squares problem.
  
      n_iter : int
          The number of iterations done by the algorithm.
  
      References
      ----------
      Cichocki, Andrzej, and P. H. A. N. Anh-Huy. "Fast local algorithms for
      large scale nonnegative matrix and tensor factorizations."
      IEICE transactions on fundamentals of electronics, communications and
      computer sciences 92.3: 708-721, 2009.
      """
      # so W and Ht are both in C order in memory
      Ht = check_array(H.T, order="C")
      X = check_array(X, accept_sparse="csr")
  
      # L1 and L2 regularization
      l1_H, l2_H, l1_W, l2_W = 0, 0, 0, 0
      if regularization in ("both", "components"):
          alpha = float(alpha)
          l1_H = l1_ratio * alpha
          l2_H = (1.0 - l1_ratio) * alpha
      if regularization in ("both", "transformation"):
          alpha = float(alpha)
          l1_W = l1_ratio * alpha
          l2_W = (1.0 - l1_ratio) * alpha
  
      rng = check_random_state(random_state)
  
      for n_iter in range(max_iter):
          violation = 0.0
  
          # Update W
          violation += _update_coordinate_descent(
              X, W, Ht, l1_W, l2_W, shuffle, rng
          )
          # Update H
          if update_H:
              violation += _update_coordinate_descent(
                  X.T, Ht, W, l1_H, l2_H, shuffle, rng
              )
  
          if n_iter == 0:
              violation_init = violation
  
          if violation_init == 0:
              break
  
          if verbose:
              print("violation:", violation / violation_init)
  
          if violation / violation_init <= tol:
              if verbose:
                  print("Converged at iteration", n_iter + 1)
              break
  
      return W, Ht.T, n_iter
  
imports: from __future__ import division, print_function
  from math import sqrt
  import warnings
  import numbers
  import numpy
  import scipy.sparse
  from ..base import BaseEstimator, TransformerMixin
  from ..utils import check_random_state, check_array
  from ..utils.extmath import randomized_svd, safe_sparse_dot, squared_norm
  from ..utils.extmath import fast_dot
  from ..utils.validation import check_is_fitted, check_non_negative
  from ..utils import deprecated
  from ..exceptions import ConvergenceWarning
  from .cdnmf_fast import _update_cdnmf_fast
label_desc: Use image node_id 14 for calling a global function with example usage: _fit_coordinate_descent(X, W, H, tol, max_iter, alpha, l1_ratio, regularization, update_H, verbose, shuffle, random_state) and returns: W,  Ht,  n_iter