code: def _feature_loop(
      ctx: Context, params: _Params, model: Model, fc: _FeatContext
  ):
      users = ctx.users
      items = ctx.items
      ratings = ctx.ratings
      umat = model.user_features
      imat = model.item_features
      est = fc.est
      f = fc.feature
      trail = fc.trail
  
      sse = 0.0
      acc_ud = 0.0
      acc_id = 0.0
      for s in range(ctx.n_samples):
          user = users[s]
          item = items[s]
          ufv = umat[user, f]
          ifv = imat[item, f]
  
          pred = est[s] + ufv * ifv + trail
          if pred < params.rmin:
              pred = params.rmin
          elif pred > params.rmax:
              pred = params.rmax
  
          error = ratings[s] - pred
          sse += error * error
  
          # compute deltas
          ufd = error * ifv - params.reg_term * ufv
          ufd = ufd * params.lrate
          acc_ud += ufd * ufd
          ifd = error * ufv - params.reg_term * ifv
          ifd = ifd * params.lrate
          acc_id += ifd * ifd
          umat[user, f] += ufd
          imat[item, f] += ifd
  
      return np.sqrt(sse / ctx.n_samples)
  
imports: import logging
  import time
  import pandas
  import numpy
  import numba
  from seedbank import numpy_rng
  from .bias import Bias
  from .mf_common import MFPredictor
  from ..None import util
label_desc: Use image node_id 3 for calling a global function with example usage: _feature_loop(ctx, params, model, fc) and returns: np