code: def min_max_scaling(
      seq: torch.Tensor, dim=-1, keepdim=False, min_scale=1e-6
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      loc = torch.min(seq, dim=dim, keepdim=keepdim)[0]
      scale = torch.max(seq, dim=dim, keepdim=keepdim)[0] - loc
      return loc, _one_if_too_small(scale, min_value=min_scale)
  
imports: from typing import Tuple
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: min_max_scaling(seq, dim, keepdim, min_scale) and returns: loc,  _one_if_too_small