class_docstr: An implementation of `"Second-order LINE" <https://arxiv.org/abs/1503.03578>`_
  from the paper "LINE: Large-scale Information Network Embedding".
  
  Args:
      dimensions (int): Dimensionality of embedding. Default is 128.
      epochs (int): Number of epochs. Default is 100.
      mini_batch_size (int): Number of samples in each mini-batch. Default is 128.
      learning_rate (float): learning rate. Default is 0.05.
      learning_rate_decay (float): learning rate decay per epoch. Default is 0.999.
      verbose (bool): whether to show a loading bar using TQDM while queering.
      seed (int): Random seed value. Default is 42.
docstr: Updates the provided gradient.
code: def _update(
      self,
      src_embedding: np.ndarray,
      dst_embedding: np.ndarray,
      edges: np.ndarray,
      src_gradient: np.ndarray,
      dst_gradient: np.ndarray,
      label: int,
  ) -> np.ndarray:
      """Updates the provided gradient."""
      src_embedding = src_embedding[edges[:, 0]]
      dst_embedding = dst_embedding[edges[:, 1]]
      dots = (src_embedding * dst_embedding).sum(axis=1)
      activations = 1.0 / (1.0 + np.exp(-dots)) - label
      src_gradient[edges[:, 0]] += (
          activations.reshape(-1, 1) * dst_embedding
      )
      dst_gradient[edges[:, 1]] += (
          activations.reshape(-1, 1) * src_embedding
      )
  
file_path: karateclub/karateclub/node_embedding/neighbourhood/second_order_line.py
imports: import numpy
  import networkx
  from karateclub.estimator import Estimator
  from tqdm.auto import trange
label_desc: Use image node_id 2 for calling the SecondOrderLINE obj's underlying member method code with example usage: obj._update(src_embedding, dst_embedding, edges, src_gradient, dst_gradient, label) without return types