code: def get_relation_type(self) -> Union[int, LongTensorType]:
      if self.has_scalar_relation_type():
          return self.get_relation_type_as_scalar()
      else:
          return self.get_relation_type_as_vector()
  
file_path: PyTorch-BigGraph/torchbiggraph/edgelist.py
imports: from typing import Any, Optional, Sequence, Union
  import torch
  from torchbiggraph.entitylist import EntityList
  from torchbiggraph.types import FloatTensorType, LongTensorType
label_desc: Use image node_id 7 for calling the EdgeList obj's underlying member method code with example usage: obj.get_relation_type() and returns: self, self