code: def aggregate_initial_architecture(hparams):
      """Helper function to aggregate initial architecture into an array hparam."""
      output = hparams.copy()
      initial_architecture_size = len(
          [
              hp
              for hp in hparams.keys()
              if hp.startswith("initial_architecture_")
          ]
      )
      if initial_architecture_size:
          output["initial_architecture"] = [
              hparams["initial_architecture_{}".format(i)]
              for i in range(initial_architecture_size)
          ]
      return output
  
imports: import functools
  import inspect
  from absl import logging
  import keras_tuner
  from model_search import controller
  from model_search import hparam
  from model_search import loss_fns
  from model_search import metric_fns
  from model_search import task_manager
  from model_search.architecture import architecture_utils
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  from model_search.meta import transfer_learning
  from model_search.metadata import ml_metadata_db
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: aggregate_initial_architecture(hparams) and returns: output