code: def get_relations(triples: torch.LongTensor) -> Set[int]:
      """Get all relations from the triples."""
      return set(triples[:, 1].tolist())
  
file_path: pykeen/src/pykeen/triples/utils.py
imports: import pathlib
  from typing import Callable, List, Mapping, Optional, Sequence, Set, TextIO, Tuple, Union
  import numpy
  import pandas
  import torch
  from pkg_resources import iter_entry_points
  from ..typing import LabeledTriples, MappedTriples
label_desc: Use image node_id 4 for calling a global function with example usage: get_relations(triples) and returns: set