code: def test_shape(self, kernel_type, ps, in_dims, device):
      inp = torch.ones(1, in_dims, ps, ps).to(device)
      ese = ExplicitSpacialEncoding(
          kernel_type=kernel_type, fmap_size=ps, in_dims=in_dims
      ).to(device)
      out = ese(inp)
      d_ = 9 if kernel_type == "cart" else 25
      assert out.shape == (1, d_ * in_dims)
  
imports: from math import pi
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia.testing
  from kornia.feature.mkd import COEFFS, EmbedGradients, ExplicitSpacialEncoding, MKDDescriptor, MKDGradients, SimpleKD, VonMisesKernel, Whitening, get_grid_dict, get_kron_order, spatial_kernel_embedding
  from kornia.testing import assert_close
label_desc: Use image node_id 1 for calling the TestExplicitSpacialEncoding obj's underlying member method code with example usage: obj.test_shape(kernel_type, ps, in_dims, device) without return types