class_docstr: Saves the globally normalized degree of target nodes
  (functional name: :obj:`target_indegree`).
  
  .. math::
  
      \mathbf{u}(i,j) = \frac{\deg(j)}{\max_{v \in \mathcal{V}} \deg(v)}
  
  in its edge attributes.
  
  Args:
      cat (bool, optional): Concat pseudo-coordinates to edge attributes
          instead of replacing them. (default: :obj:`True`)
class_docstr_tok: ["Saves","the","globally","normalized","degree","of","target","nodes","(","functional","name",":",":","obj",":","`","target_indegree","`",")",".","..","math",":",":","\\mathbf","{","u","}","(","i",",","j",")","=","\\frac","{","\\deg","(","j",")","}","{","\\max_","{","v","\\in","\\mathcal","{","V","}","}","\\deg","(","v",")","}","in","its","edge","attributes",".","Args",":","cat","(","bool",",","optional",")",":","Concat","pseudo-coordinates","to","edge","attributes","instead","of","replacing","them",".","(","default",":",":","obj",":","`","True","`",")"]
code: def forward(self, data: Data) -> Data:
      assert data.edge_index is not None
      col, pseudo = data.edge_index[1], data.edge_attr
  
      deg = degree(col, data.num_nodes)
  
      if self.norm:
          deg = deg / (deg.max() if self.max is None else self.max)
  
      deg = deg[col]
      deg = deg.view(-1, 1)
  
      if pseudo is not None and self.cat:
          pseudo = pseudo.view(-1, 1) if pseudo.dim() == 1 else pseudo
          data.edge_attr = torch.cat(
              [pseudo, deg.type_as(pseudo)], dim=-1
          )
      else:
          data.edge_attr = deg
  
      return data
  
file_path: pytorch_geometric/torch_geometric/transforms/target_indegree.py
imports: from typing import Optional
  import torch
  from torch_geometric.data import Data
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.utils import degree
label_desc: Use image node_id 2 for calling the TargetIndegree obj's underlying member method code with example usage: obj.forward(data) and returns: data