code: def compute_accuracy(candidate_list, reference_list, form_manager):
      if len(candidate_list) != len(reference_list):
          print(
              "candidate list has length {}, reference list has length {}\n".format(
                  len(candidate_list), len(reference_list)
              )
          )
  
      len_min = min(len(candidate_list), len(reference_list))
      c = 0
      for i in range(len_min):
          if is_all_same(candidate_list[i], reference_list[i]):
              c = c + 1
          else:
              pass
  
      return c / float(len_min)
  
imports: import random
  import time
  import warnings
  import numpy
  import torch
  import torch.nn.functional
  import torch.nn.init
  from torch import nn, optim
  from ....modules.prediction.generation.TreeBasedDecoder import StdTreeDecoder, create_mask
  from ....modules.utils.tree_utils import DataLoader, Tree, to_cuda
label_desc: Use image node_id 6 for calling a global function with example usage: compute_accuracy(candidate_list, reference_list, form_manager) and returns: unknown