def METHOD_NAME(
    test_case,
    model_path: str,
    module_name: str,
    device: str = "cuda",
    batch_size: int = 16,
    img_size: int = 224,
):
    image_nd = np.random.rand(batch_size, 3, img_size, img_size).astype(np.float32)
    label_nd = np.array([e for e in range(batch_size)], dtype=np.int32)
    oneflow_model_loss = []
    pytorch_model_loss = []
    with tempfile.NamedTemporaryFile() as f:
        pytorch_model_loss = get_loss(
            image_nd, label_nd, model_path, module_name, True, device, f.name
        )
        oneflow_model_loss = get_loss(
            image_nd, label_nd, model_path, module_name, False, device, f.name
        )
    if verbose:
        indes = [i for i in range(len(oneflow_model_loss))]
        plt.plot(indes, oneflow_model_loss, label="oneflow")
        plt.plot(indes, pytorch_model_loss, label="pytorch")
        plt.xlabel("iter - axis")
        # Set the y axis label of the current axis.
        plt.ylabel("loss - axis")
        # Set a title of the current axes.
        plt.title("compare ")
        # show a legend on the plot
        plt.legend()
        # Display a figure.
        plt.savefig("./loss_compare.png")
        plt.show()
    test_case.assertTrue(
        np.allclose(cos_sim(oneflow_model_loss, pytorch_model_loss), 1.0, 1e-1, 1e-1)
    )