code: def _get_embedding_for_data_point(
      self, prediction_data_point: Relation
  ) -> torch.Tensor:
      span_1 = prediction_data_point.first
      span_2 = prediction_data_point.second
      embedding_names = self.embeddings.get_names()
  
      if self.pooling_operation == "first_last":
          return torch.cat(
              [
                  span_1.tokens[0].get_embedding(embedding_names),
                  span_1.tokens[-1].get_embedding(embedding_names),
                  span_2.tokens[0].get_embedding(embedding_names),
                  span_2.tokens[-1].get_embedding(embedding_names),
              ]
          )
      else:
          return torch.cat(
              [
                  span_1.tokens[0].get_embedding(embedding_names),
                  span_2.tokens[0].get_embedding(embedding_names),
              ]
          )
  
file_path: flair/flair/models/relation_extractor_model.py
imports: import logging
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Set, Tuple, Union
  import torch
  import flair.embeddings
  import flair.nn
  from flair.data import Relation, Sentence
  from flair.file_utils import cached_path
label_desc: Use image node_id 3 for calling the RelationExtractor obj's underlying member method code with example usage: obj._get_embedding_for_data_point(prediction_data_point) and returns: torch, torch