def METHOD_NAME(self):
    """Freezes a Keras LSTM."""
    model = keras.models.Sequential(
        [keras.layers.LSTM(units=10, input_shape=(10, 10))]
    )
    tensor_names = [tensor.name for tensor in model.inputs + model.outputs]
    # Freeze the model.
    sess = keras.backend.get_session()
    variable_graph_def = sess.graph_def
    variable_graph_def = self._inline_functions(
        variable_graph_def, tensor_names
    )
    output_tensor = self._get_tensor_names(model.outputs)
    constant_graph_def = (
        tf.compat.v1.graph_util.convert_variables_to_constants(
            sess, variable_graph_def, output_tensor
        )
    )
    # Validate converted graph.
    input_data = np.array(
        np.random.random_sample([10, 10, 10]), dtype=np.int32
    )
    self._ensure_no_variables_in_graph(constant_graph_def)
    self._test_converted_keras_model(model, constant_graph_def, input_data)