code: def __init__(
      self,
      node_type,
      edge_type,
      max_id,
      dim,
      num_negs=5,
      order=1,
      feature_idx=-1,
      feature_dim=0,
      use_id=True,
      sparse_feature_idx=-1,
      sparse_feature_max_id=-1,
      embedding_dim=16,
      use_hash_embedding=False,
      combiner="add",
      metric="mrr",
      *args,
      **kwargs,
  ):
      super(Line, self).__init__(
          node_type,
          edge_type,
          max_id,
          num_negs,
          metric,
          *args,
          **kwargs,
      )
  
      if order == 1:
          order = "first"
      if order == 2:
          order = "second"
  
      self._target_encoder = tf_euler.utils.encoders.ShallowEncoder(
          dim=dim,
          feature_idx=feature_idx,
          feature_dim=feature_dim,
          max_id=max_id if use_id else -1,
          sparse_feature_idx=sparse_feature_idx,
          sparse_feature_max_id=sparse_feature_max_id,
          embedding_dim=embedding_dim,
          use_hash_embedding=use_hash_embedding,
          combiner=combiner,
      )
      if order == "first":
          self._context_encoder = self._target_encoder
      elif order == "second":
          self._context_encoder = (
              tf_euler.utils.encoders.ShallowEncoder(
                  dim=dim,
                  feature_idx=feature_idx,
                  feature_dim=feature_dim,
                  max_id=max_id if use_id else -1,
                  sparse_feature_idx=sparse_feature_idx,
                  sparse_feature_max_id=sparse_feature_max_id,
                  embedding_dim=embedding_dim,
                  use_hash_embedding=use_hash_embedding,
                  combiner=combiner,
              )
          )
      else:
          raise ValueError(
              'Line order must be one of 1, 2, "first",'
              ' or "second" got {}:'.format(order)
          )
  
file_path: euler/examples/line/line.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tf_euler
  from tf_euler.python.mp_utils.base_gnn import BaseGNNNet
  from tf_euler.python.mp_utils.base import SuperviseModel, UnsuperviseModel
label_desc: Use image node_id 1 to create a new Line object from inherited base classes: UnsuperviseModel with example: obj = Line(node_type, edge_type, max_id, dim, num_negs, order, feature_idx, feature_dim, use_id, sparse_feature_idx, sparse_feature_max_id, embedding_dim, use_hash_embedding, combiner, metric)