class_docstr: Sparse Embedding for Knowledge Graph
  It is used to store both entity embeddings and relation embeddings.
  
  Parameters
  ----------
  args :
      Global configs.
  num : int
      Number of embeddings.
  dim : int
      Embedding dimention size.
  device : th.device
      Device to store the embedding.
code: def setup_cross_rels(self, cross_rels, global_emb):
      cpu_bitmap = th.zeros((self.num,), dtype=th.bool)
      for i, rel in enumerate(cross_rels):
          cpu_bitmap[rel] = 1
      self.cpu_bitmap = cpu_bitmap
      self.has_cross_rel = True
      self.global_emb = global_emb
  
imports: import os
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.nn.init
  import torch.multiprocessing
  from torch.multiprocessing import Queue
  from _thread import start_new_thread
  import traceback
  from functools import wraps
  from ..None import *
label_desc: Use image node_id 3 for calling the ExternalEmbedding obj's underlying member method code with example usage: obj.setup_cross_rels(cross_rels, global_emb) without return types