def METHOD_NAME(self, hp, inputs=None):
    # Get the input_node from inputs.
    input_node = tf.nest.flatten(inputs)[0]
    layer = tf.keras.layers.Dense(
        hp.Int("num_units", min_value=32, max_value=512, step=32)
    )
    output_node = layer(input_node)
    return output_node