code: def test_save_image_tensor(self, img_tensors, tmpdir, sampler_sample):
      sampler = sampler_sample
  
      dir_path = os.path.join(tmpdir, "dummy_folder")
      img_path = os.path.join(dir_path, "test_img.png")
  
      sampler.save_img(img_tensors, dir_path, "test_img.png")
  
      assert os.path.isdir(dir_path)
      assert os.path.isfile(img_path)
  
      rec_img = torch.tensor(imread(img_path)) / 255.0
  
      assert 1 >= rec_img.max() >= 0
  
file_path: benchmark_VAE/tests/test_baseSampler.py
imports: import os
  import numpy
  import pytest
  import torch
  from imageio import imread
  from pythae.models import BaseAE, BaseAEConfig
  from pythae.samplers import BaseSampler, BaseSamplerConfig
label_desc: Use image node_id 2 for calling the Test_BaseSampler_saving obj's underlying member method code with example usage: obj.test_save_image_tensor(img_tensors, tmpdir, sampler_sample) without return types