code: def _test_model(self, hparams, model_cls):
      batch_size = 3
      target_length = 6
      target_out = 10  # GeneExpressionProblem.num_output_predictions
      input_length = target_length * 128 // 4  # chunk_size=4
      input_vocab_size = 5
  
      inputs = np.random.randint(
          1, input_vocab_size + 1, size=(batch_size, input_length, 1, 1)
      )
      targets = np.random.random_sample(
          (batch_size, target_length, 1, target_out)
      )
  
      features = {
          "inputs": tf.constant(inputs, dtype=tf.int32),
          "targets": tf.constant(targets, dtype=tf.float32),
      }
      p_hparams = hparams.problem_hparams
      logits, _ = model_cls(
          hparams, tf_estimator.ModeKeys.TRAIN, p_hparams
      )(features)
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          res = sess.run(logits)
  
      self.assertEqual(
          res.shape, (batch_size, target_length, 1, target_out)
      )
  
file_path: tensor2tensor/tensor2tensor/models/research/gene_expression_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import gene_expression
  from tensor2tensor.layers import modalities
  from tensor2tensor.models.research import gene_expression
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling the GeneExpressionModelsTest obj's underlying member method code with example usage: obj._test_model(hparams, model_cls) without return types