code: def check_so2_t_shape(t: Tensor) -> None:
      t_shape = t.shape
      len_t_shape = len(t_shape)
      if (
          ((len_t_shape == 2) and (t_shape[1] != 2))
          or ((len_t_shape == 1) and (t_shape[0] != 2))
          or (len_t_shape > 2)
      ):
          raise ValueError(
              f"Invalid translation shape, we expect [B, 2], or [2] Got: {t_shape}"
          )
  
file_path: kornia/kornia/geometry/liegroup/_utils.py
imports: from kornia.core import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: check_so2_t_shape(t) without return types