class_docstr: NCL is a neighborhood-enriched contrastive learning paradigm for graph collaborative filtering.
  Both structural and semantic neighbors are explicitly captured as contrastive learning objects.
class_docstr_tok: ["NCL","is","a","neighborhood-enriched","contrastive","learning","paradigm","for","graph","collaborative","filtering",".","Both","structural","and","semantic","neighbors","are","explicitly","captured","as","contrastive","learning","objects","."]
docstr: Get the embedding of users and items and combine to an embedding matrix.
  
  Returns:
      Tensor of the embedding matrix. Shape of [n_items+n_users, embedding_dim]
docstr_tok: ["Get","the","embedding","of","users","and","items","and","combine","to","an","embedding","matrix",".","Returns",":","Tensor","of","the","embedding","matrix",".","Shape","of","[","n_items+n_users",",","embedding_dim","]"]
code: def get_ego_embeddings(self):
      r"""Get the embedding of users and items and combine to an embedding matrix.
  
      Returns:
          Tensor of the embedding matrix. Shape of [n_items+n_users, embedding_dim]
      """
      user_embeddings = self.user_embedding.weight
      item_embeddings = self.item_embedding.weight
      ego_embeddings = torch.cat(
          [user_embeddings, item_embeddings], dim=0
      )
      return ego_embeddings
  
imports: import numpy
  import scipy.sparse
  import torch
  import torch.nn.functional
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.init import xavier_uniform_initialization
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 5 for calling the NCL obj's underlying member method code with example usage: obj.get_ego_embeddings() and returns: ego_embeddings