code: def test_embed_extract(self):
      device = torch.device("cpu")
      res = resnet34(pretrained=True)
      res = res.to(device)
      emb = EmbeddingExtractor(res)
      emb.disp_modules(full=True)
      emb.disp_modules(full=False)
      layer_name = "conv1"
      emb.register(layer_name)
      img = os.path.join(
          os.path.dirname(os.path.abspath(__file__)), "cat.jpg"
      )
      image = Image.open(img)
      transform = transforms.Compose(
          [transforms.Resize((224, 224)), transforms.ToTensor()]
      )
      img = transform(image).unsqueeze(dim=0).to(device)
      res(img)
      self.assertTrue(
          emb.emb_out.embeddings[0].shape
          == torch.Size([1, 64, 112, 112])
      )
  
file_path: towhee/tests/unittests/models/embedding/test_embedding_extractor.py
imports: import unittest
  import torch
  import os
  from torchvision.models import resnet34
  from torchvision import transforms
  from towhee.utils.pil_utils import PILImage
  from towhee.models.embedding.embedding_extractor import EmbeddingExtractor
label_desc: Use image node_id 1 for calling the EmbeddingExtractorTest obj's underlying member method code with example usage: obj.test_embed_extract() without return types