class_docstr: Transforms node positions :obj:`data.pos` with a square transformation
  matrix computed offline (functional name: :obj:`linear_transformation`).
  
  Args:
      matrix (Tensor): Tensor with shape :obj:`[D, D]` where :obj:`D`
          corresponds to the dimensionality of node positions.
class_docstr_tok: ["Transforms","node","positions",":","obj",":","`","data.pos","`","with","a","square","transformation","matrix","computed","offline","(","functional","name",":",":","obj",":","`","linear_transformation","`",")",".","Args",":","matrix","(","Tensor",")",":","Tensor","with","shape",":","obj",":","`","[","D",",","D","]","`","where",":","obj",":","`","D","`","corresponds","to","the","dimensionality","of","node","positions","."]
code: def forward(
      self,
      data: Union[Data, HeteroData],
  ) -> Union[Data, HeteroData]:
      for store in data.node_stores:
          if not hasattr(store, "pos"):
              continue
  
          pos = (
              store.pos.view(-1, 1)
              if store.pos.dim() == 1
              else store.pos
          )
          assert pos.size(-1) == self.matrix.size(-2), (
              "Node position matrix and transformation matrix have "
              "incompatible shape"
          )
          # We post-multiply the points by the transformation matrix instead
          # of pre-multiplying, because `pos` attribute has shape `[N, D]`,
          # and we want to preserve this shape.
          store.pos = pos @ self.matrix.to(pos.device, pos.dtype)
  
      return data
  
file_path: pytorch_geometric/torch_geometric/transforms/linear_transformation.py
imports: from typing import Union
  import torch
  from torch import Tensor
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
label_desc: Use image node_id 2 for calling the LinearTransformation obj's underlying member method code with example usage: obj.forward(data) and returns: data