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")
          ]
      )
      output["initial_architecture"] = [
          hparams["initial_architecture_{}".format(i)]
          for i in range(initial_architecture_size)
      ]
      return output
  
imports: import contextlib
  import copy
  import json
  import os
  import random
  from absl import flags
  from absl import logging
  import keras_tuner
  from model_search import hparam
  from model_search import phoenix
  from model_search import registry
  from model_search.data import data
  from model_search.metadata import ml_metadata_db
  from model_search.proto import phoenix_spec_pb2
  import tensorflow.compat.v2
  from google.protobuf import text_format
label_desc: Use image node_id 7 for calling a global function with example usage: aggregate_initial_architecture(hparams) and returns: output