code: def test_build_block_in_blocks_with_same_name(tmp_path):
      class Block1(ak.Block):
          def build(self, hp, inputs):
              hp.Boolean("a")
              return keras.layers.Dense(3)(tf.nest.flatten(inputs)[0])
  
      class Block2(ak.Block):
          def build(self, hp, inputs):
              hp.Boolean("b")
              return Block1().build(hp, inputs)
  
      inputs = ak.Input()
      outputs = Block2()(inputs)
      outputs = ak.RegressionHead()(outputs)
      auto_model = ak.AutoModel(
          inputs, outputs, max_trials=5, directory=tmp_path
      )
      auto_model.fit(
          np.random.rand(100, 5), np.random.rand(100, 1), epochs=1
      )
  
      trials = [
          trial
          for trial_id, trial in auto_model.tuner.oracle.trials.items()
      ]
      for trial in trials:
          assert len(trial.hyperparameters.values) == len(
              trials[0].hyperparameters.values
          )
  
imports: from unittest import mock
  import numpy
  import tensorflow
  from tensorflow import keras
  from tensorflow.keras.layers.experimental import preprocessing
  import autokeras
  from autokeras import keras_layers
  from autokeras import test_utils
  from autokeras.engine import tuner
  from autokeras.tuners import greedy
label_desc: Use image node_id 12 for calling a global function with example usage: test_build_block_in_blocks_with_same_name(tmp_path) and returns: keras, Block1