class_docstr: DGL Knowledge Embedding Model.
  
  Parameters
  ----------
  args:
      Global configs.
  model_name : str
      Which KG model to use, including 'TransE_l1', 'TransE_l2', 'TransR',
      'RESCAL', 'DistMult', 'ComplEx', 'RotatE', 'SimplE'
  n_entities : int
      Num of entities.
  n_relations : int
      Num of relations.
  hidden_dim : int
      Dimension size of embedding.
  gamma : float
      Gamma for score function.
  double_entity_emb : bool
      If True, entity embedding size will be 2 * hidden_dim.
      Default: False
  double_relation_emb : bool
      If True, relation embedding size will be 2 * hidden_dim.
      Default: False
code: def pull_model(self, client, pos_g, neg_g):
      with th.no_grad():
          entity_id = F.cat(
              seq=[pos_g.ndata["id"], neg_g.ndata["id"]], dim=0
          )
          relation_id = pos_g.edata["id"]
          entity_id = F.tensor(np.unique(F.asnumpy(entity_id)))
          relation_id = F.tensor(np.unique(F.asnumpy(relation_id)))
  
          l2g = client.get_local2global()
          global_entity_id = l2g[entity_id]
  
          entity_data = client.pull(
              name="entity_emb", id_tensor=global_entity_id
          )
          relation_data = client.pull(
              name="relation_emb", id_tensor=relation_id
          )
  
          self.entity_emb.emb[entity_id] = entity_data
          self.relation_emb.emb[relation_id] = relation_data
  
imports: import os
  import numpy
  import math
  import dgl.backend
  import pdb
  import torch
  import torch.nn
  from .pytorch.tensor_models import logsigmoid
  from .pytorch.tensor_models import abs
  from .pytorch.tensor_models import masked_select
  from .pytorch.tensor_models import get_device, get_dev
  from .pytorch.tensor_models import norm
  from .pytorch.tensor_models import get_scalar
  from .pytorch.tensor_models import reshape
  from .pytorch.tensor_models import cuda
  from .pytorch.tensor_models import ExternalEmbedding
  from .pytorch.tensor_models import InferEmbedding
  from .pytorch.score_fun import *
  from .pytorch.loss import LossGenerator
label_desc: Use image node_id 18 for calling the KEModel obj's underlying member method code with example usage: obj.pull_model(client, pos_g, neg_g) without return types