code: def test_interpolate(self, ae, demo_data, granularity):
      with pytest.raises(AssertionError):
          ae.interpolate(demo_data, demo_data[1:], granularity)
  
      interp = ae.interpolate(demo_data, demo_data, granularity)
  
      assert tuple(interp.shape) == (
          demo_data.shape[0],
          granularity,
      ) + (demo_data.shape[1:])
  
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 4 for calling the Test_Model_interpolate obj's underlying member method code with example usage: obj.test_interpolate(ae, demo_data, granularity) without return types