class_docstr: Shallow models for knowledge representation learning.
      
docstr: Create trace for gradient update.
  Returns:
      list of np.ndarray: Index and gradients of entities.
      list of np.ndarray: Index and gradients of relations.
code: def create_trace(self, ent_index, ent_emb, rel_index, rel_emb):
      """Create trace for gradient update.
      Returns:
          list of np.ndarray: Index and gradients of entities.
          list of np.ndarray: Index and gradients of relations.
      """
      if self._ent_emb_on_cpu:
          ent_trace = self.ent_embedding.create_trace(
              ent_index, ent_emb
          )
      else:
          ent_trace = None
      if self._rel_emb_on_cpu:
          rel_trace = self.rel_embedding.create_trace(
              rel_index, rel_emb
          )
      else:
          rel_trace = None
  
      return ent_trace, rel_trace
  
imports: import os
  import json
  import math
  import warnings
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from pgl.utils.shared_embedding import SharedEmbedding
  from models.score_funcs import TransEScore, RotatEScore, DistMultScore, ComplExScore, QuatEScore, OTEScore
  from models.init_func import InitFunction
  from utils import uniform, timer_wrapper
label_desc: Use image node_id 13 for calling the KGEModel obj's underlying member method code with example usage: obj.create_trace(ent_index, ent_emb, rel_index, rel_emb) and returns: ent_trace,  rel_trace