code: def test_init_doppelganer(self):
      df = get_train_data()
      feature_outputs = [
          Output(
              type_=OutputType.CONTINUOUS,
              dim=1,
              normalization=Normalization.MINUSONE_ONE,
          )
      ]
      attribute_outputs = [
          Output(type_=OutputType.DISCRETE, dim=9),
          Output(type_=OutputType.DISCRETE, dim=3),
          Output(type_=OutputType.DISCRETE, dim=2),
      ]
  
      doppelganger = DPGANSimulator(
          L_max=550,
          sample_len=10,
          feature_dim=1,
          num_real_attribute=3,
          num_threads=1,
      )
      doppelganger.fit(
          data_feature=df["data_feature"],
          data_attribute=df["data_attribute"],
          data_gen_flag=df["data_gen_flag"],
          feature_outputs=feature_outputs,
          attribute_outputs=attribute_outputs,
          epoch=2,
          batch_size=32,
      )
  
      feature, attribute, gen_flags, lengths = doppelganger.generate()
      assert feature.shape == (1, doppelganger.L_max, 1)
      assert attribute.shape == (1, df["data_attribute"].shape[-1])
      assert (
          gen_flags.shape == (1, doppelganger.L_max)
          and (gen_flags[0, :] == 1).all()
      )
      assert lengths[0] == doppelganger.L_max
  
      with tempfile.TemporaryDirectory() as tf:
          doppelganger.save(tf)
          doppelganger.load(tf)
      df.close()
  
      # illegal input
      df = get_train_data()
      feature_outputs = [
          Output(
              type_=OutputType.CONTINUOUS,
              dim=1,
              normalization=Normalization.MINUSONE_ONE,
          )
      ]
      attribute_outputs = [
          Output(type_=OutputType.DISCRETE, dim=9),
          Output(type_=OutputType.DISCRETE, dim=3),
          Output(type_=OutputType.DISCRETE, dim=2),
      ]
  
      doppelganger = DPGANSimulator(
          L_max=551,
          sample_len=10,
          feature_dim=1,
          num_real_attribute=3,
          num_threads=1,
      )
  
      with pytest.raises(RuntimeError):
          doppelganger.fit(
              data_feature=df["data_feature"],
              data_attribute=df["data_attribute"],
              data_gen_flag=df["data_gen_flag"],
              feature_outputs=feature_outputs,
              attribute_outputs=attribute_outputs,
          )
      df.close()
  
file_path: analytics-zoo/pyzoo/test/zoo/chronos/simulator/test_doppelganger_simulator.py
imports: import tempfile
  import numpy
  import pytest
  from zoo.chronos.simulator import DPGANSimulator
  from zoo.chronos.simulator.doppelganger.output import Output, OutputType, Normalization
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
label_desc: Use image node_id 4 for calling the TestDoppelganer obj's underlying member method code with example usage: obj.test_init_doppelganer() without return types