code: def layer_stack_from_hparams(hparams, prefix):
    
    layers = hparams.get(prefix + "layers")
    return transformer.LayerStack(
        [layers_registry[l](hparams, prefix) for l in layers],
        dropout_rate=hparams.layer_prepostprocess_dropout,
        norm_epsilon=hparams.norm_epsilon)
docs: Create a layer stack based on the hyperparameter values.