docs: def sg_lookup(tensor, opt):
      r"""Looks up the `tensor`, which is the embedding matrix.
  
      Args:
          tensor: A tensor ( automatically given by chain )
          opt:
            emb: A 2-D `Tensor`. An embedding matrix.
            name: If provided, replace current tensor's name.
  
      Returns:
          A `Tensor`.
  
      """
      assert opt.emb is not None, 'emb is mandatory.'
      return tf.nn.embedding_lookup(opt.emb, tensor, name=opt.name)