code: def generate_data(gan, batches, batch_size):
      for i in range(batches):
          means, values = generate_batch(batch_size)
          batch = {
              gan.data_inputs[0]: values,
              gan.conditional_inputs[0]: means,
          }
          yield batch
  
file_path: deepchem/deepchem/models/tests/test_gan.py
imports: import deepchem
  import numpy
  import pytest
  import tempfile
  from flaky import flaky
label_desc: Use image node_id 2 for calling a global function with example usage: generate_data(gan, batches, batch_size) without return types