class_docstr: LINE is a graph embedding model.
  
  We implement the model to train users and items embedding for recommendation.
code: def sampler(self, key_ids):
      key_ids = np.array(key_ids.cpu())
      key_num = len(key_ids)
      total_num = key_num
      value_ids = np.zeros(total_num, dtype=np.int64)
      check_list = np.arange(total_num)
      key_ids = np.tile(key_ids, 1)
      while len(check_list) > 0:
          value_ids[check_list] = self.random_num(len(check_list))
          check_list = np.array(
              [
                  i
                  for i, used, v in zip(
                      check_list,
                      self.used_ids[key_ids[check_list]],
                      value_ids[check_list],
                  )
                  if v in used
              ]
          )
  
      return torch.tensor(value_ids, device=self.device)
  
imports: import random
  import numpy
  import torch
  import torch.nn
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.utils import InputType
label_desc: Use image node_id 3 for calling the LINE obj's underlying member method code with example usage: obj.sampler(key_ids) and returns: torch