code: def get_block_hparams(hparams, block_name):
      if not hparams:
          return None
      return hp.HParams(
          **{
              k[len(block_name + "_") :]: v
              for k, v in hparams.values().items()
              if k.startswith(block_name + "_")
          }
      )
  
imports: import collections
  import os
  import string
  import time
  from absl import flags
  from absl import logging
  from model_search import block
  from model_search import block_builder
  from model_search import hparam
  from model_search import utils
  from model_search.proto import hparam_pb2
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
  import tf_slim
  from google.protobuf import text_format
label_desc: Use image node_id 2 for calling a global function with example usage: get_block_hparams(hparams, block_name) and returns: hp, None