code: def test_batch_sample(self, get_architecture):
      algorithm = harmonica.Harmonica(
          test_utils.create_spec(
              phoenix_spec_pb2.PhoenixSpec.DNN,
              blocks_to_use=[
                  "FIXED_CHANNEL_CONVOLUTION_16",
                  "FIXED_CHANNEL_CONVOLUTION_32",
                  "FIXED_CHANNEL_CONVOLUTION_64",
                  "CONVOLUTION_3X3",
              ],
              min_depth=4,
          )
      )
      get_architecture.side_effect = [
          np.array([1, 2, 3, 4]),
          np.array([2, 3, 4, 1]),
          np.array([3, 4, 1, 2]),
          # Adding 34 (flatten) to see that it is ignored
          np.array([4, 1, 2, 34, 3]),
          np.array([1, 1, 1, 1]),
          np.array([2, 2, 2, 2]),
          np.array([3, 3, 3, 3]),
          np.array([2, 3, 2, 3]),
          np.array([3, 4, 3, 4]),
      ]
      x, y = algorithm.batch_sample(_create_trials())
      self.assertAllEqual(
          [
              [
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
              ],
              [
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  1,
                  -1,
                  -1,
                  -1,
              ],
              [
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
              ],
              [
                  -1,
                  -1,
                  -1,
                  1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
              ],
              [
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
              ],
              [
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
              ],
              [
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
              ],
              [
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
              ],
              [
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  1,
                  -1,
                  -1,
                  -1,
                  -1,
                  1,
              ],
          ],
          x,
      )
      self.assertAllEqual(
          [0.97, 0.94, 0.7, 0.72, 0.3, 0.79, 0.39, 0.9, 0.19], y
      )
  
file_path: model_search/model_search/search/harmonica_test.py
imports: from absl.testing import parameterized
  import mock
  from model_search import hparam
  from model_search.metadata import trial
  from model_search.proto import phoenix_spec_pb2
  from model_search.search import harmonica
  from model_search.search import test_utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the HarmonicaTest obj's underlying member method code with example usage: obj.test_batch_sample(get_architecture) without return types