code: def scatter_log_softmax(
      src: torch.Tensor,
      index: torch.Tensor,
      dim: int = -1,
      eps: float = 1e-12,
      dim_size: Optional[int] = None,
  ) -> torch.Tensor:
      if not torch.is_floating_point(src):
          raise ValueError(
              "`scatter_log_softmax` can only be computed over "
              "tensors with floating point data types."
          )
  
      index = broadcast(index, src, dim)
  
      max_value_per_index = scatter_max(
          src, index, dim=dim, dim_size=dim_size
      )[0]
      max_per_src_element = max_value_per_index.gather(dim, index)
  
      recentered_scores = src - max_per_src_element
  
      sum_per_index = scatter_sum(
          recentered_scores.exp(), index, dim, dim_size=dim_size
      )
      normalizing_constants = (
          sum_per_index.add_(eps).log_().gather(dim, index)
      )
  
      return recentered_scores.sub_(normalizing_constants)
  
imports: from typing import Optional
  import torch
  from torch_scatter import scatter_sum, scatter_max
  from torch_scatter.utils import broadcast
label_desc: Use image node_id 2 for calling a global function with example usage: scatter_log_softmax(src, index, dim, eps, dim_size) and returns: recentered_scores