code: def __init__(
      self,
      user,
      max_item,
      item=None,
      item_bias=None,
      p_item=None,
      neg_num=5,
      p_item_bias=None,
      n_item=None,
      n_item_bias=None,
      margin=1.0,
      train=None,
      scope=None,
      reuse=False,
  ):
      self._max_item = max_item
      self._margin = margin
      self._neg_num = neg_num
  
      assert train is not None, "train cannot be None"
      assert user is not None, "user cannot be None"
      self._user = user
  
      if train:
          assert p_item is not None, "p_item cannot be None"
          assert n_item is not None, "n_item cannot be None"
          assert p_item_bias is not None, "p_item_bias cannot be None"
          assert n_item_bias is not None, "n_item_bias cannot be None"
  
          self._p_item = p_item
          self._n_item = n_item
          self._p_item_bias = p_item_bias
          self._n_item_bias = n_item_bias
      else:
          assert item is not None, "item cannot be None"
          assert item_bias is not None, "item_bias cannot be None"
  
          self._item = item
          self._item_bias = item_bias
  
      super(NSEuDist, self).__init__(
          train=train, scope=scope, reuse=reuse
      )
  
imports: import tensorflow
  from openrec.tf1.legacy.modules.interactions import Interaction
label_desc: Use image node_id 1 to create a new NSEuDist object from inherited base classes: Interaction with example: obj = NSEuDist(user, max_item, item, item_bias, p_item, neg_num, p_item_bias, n_item, n_item_bias, margin, train, scope, reuse)