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