code: def asynchronous_compute_gradient(
      self, batch_ctx, encryptor, w, X, Y, weight
  ):
      h = X.shape[0]
      # logger.info(f"h: {h}")
      Xw = torch.matmul(X, w.detach())
      half_d = 0.25 * Xw - 0.5 * Y
      if weight:
          half_d = half_d * weight
      batch_ctx.hosts.put(
          "half_d", encryptor.encrypt_tensor(half_d, obfuscate=True)
      )
      half_g = torch.matmul(X.T, half_d)
  
      Xw_h = batch_ctx.hosts.get("Xw_h")[0]
      if weight:
          Xw_h = Xw_h * weight
  
      if self.floating_point_precision:
          host_half_g = torch.matmul(
              torch.encode_as_int_f(X.T, self.floating_point_precision),
              Xw_h,
          )
          host_half_g = 1 / self._fixpoint_precision * host_half_g
      else:
          host_half_g = torch.matmul(X.T, Xw_h)
  
      loss = (
          np.log(2)
          - 1
          + 0.125 / h * torch.matmul(Xw.T, Xw)
          - 2 / h * torch.matmul(half_d.T, Y)
      )
  
      if self.optimizer.l1_penalty or self.optimizer.l2_penalty:
          loss_norm = self.optimizer.loss_norm(w)
          loss += loss_norm
  
      loss += torch.matmul((1 / h * Xw).T, Xw_h) - torch.matmul(
          (2 / h * Y).T, Xw_h
      )
  
      for Xw2_h in batch_ctx.hosts.get("Xw2_h"):
          loss += 0.125 / h * Xw2_h
      h_loss_list = batch_ctx.hosts.get("h_loss")
      for h_loss in h_loss_list:
          if h_loss is not None:
              loss += h_loss
  
      batch_ctx.arbiter.put(loss=loss)
      # gradient
      g = 1 / h * (half_g + host_half_g)
      return g
  
imports: import logging
  import numpy
  import torch
  from fate.arch import Context, dataframe
  from fate.ml.abc.module import HeteroModule
  from fate.ml.utils import predict_tools
  from fate.ml.utils._model_param import check_overflow, deserialize_param, initialize_param, serialize_param
  from fate.ml.utils._optimizer import LRScheduler, Optimizer
label_desc: Use image node_id 2 for calling the CoordinatedLREstimatorGuest obj's underlying member method code with example usage: obj.asynchronous_compute_gradient(batch_ctx, encryptor, w, X, Y, weight) and returns: g