def METHOD_NAME(graph: tf.Graph):
    try:
        t_model_type = bytes.decode(get_tensor_by_name_from_graph(graph, "model_type"))
    except GraphWithoutTensorError as e:
        # Compatible with the upgraded model, which has no 'model_type' info
        t_model_type = None
    if t_model_type == "compressed_model":
        raise RuntimeError(
            "The input frozen model has already been compressed! Please do not compress the model repeatedly. "
        )