code: def test_embed(self, ae, demo_data):
      embedding = ae.embed(demo_data)
      assert tuple(embedding.shape) == (
          demo_data.shape[0],
          ae.model_config.latent_dim,
      )
  
imports: import os
  from copy import deepcopy
  import pytest
  import torch
  from pythae.customexception import BadInheritanceError
  from pythae.models import AE, AEConfig, AutoModel
  from pythae.models.base.base_utils import ModelOutput
  from pythae.pipelines import GenerationPipeline, TrainingPipeline
  from pythae.samplers import GaussianMixtureSamplerConfig, IAFSamplerConfig, MAFSamplerConfig, NormalSamplerConfig
  from pythae.trainers import BaseTrainer, BaseTrainerConfig
  from tests.data.custom_architectures import Decoder_AE_Conv, Encoder_AE_Conv, NetBadInheritance
label_desc: Use image node_id 3 for calling the Test_Model_embed obj's underlying member method code with example usage: obj.test_embed(ae, demo_data) without return types