code: def __init__(self, item_only=False, attention=True):
      super(Aggregator, self).__init__()
  
      # Only aggregate item embedding
      self.item_only = item_only
      # Whether use attention mechanism
      self.attention = attention
  
imports: import numpy
  import scipy.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.layers import SparseDropout
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new Aggregator object from inherited base classes: nn with example: obj = Aggregator(item_only, attention)