class_docstr: An interface for inverse-relation ID mapping.
class_docstr_tok: ["An","interface","for","inverse-relation","ID","mapping","."]
docstr: Map relations in a batch, optionally also inverting them.
docstr_tok: ["Map","relations","in","a","batch",",","optionally","also","inverting","them","."]
code: def map(
      self,
      batch: torch.LongTensor,
      index: int = 1,
      invert: bool = False,
  ) -> torch.LongTensor:
      """Map relations in a batch, optionally also inverting them."""
      batch = self._map(batch=batch, index=index)
      return self.invert_(batch=batch, index=index) if invert else batch
  
file_path: pykeen/src/pykeen/inverse.py
imports: from abc import ABC, abstractmethod
  from typing import TypeVar
  import torch
  from class_resolver import Resolver
label_desc: Use image node_id 4 for calling the RelationInverter obj's underlying member method code with example usage: obj.map(batch, index, invert) and returns: unknown