code: def calculate_unknown_ratio(data):
      unknown = sum((s == UNK).sum() for s in data)
      total = sum(s.size for s in data)
      return unknown / total
  
imports: import argparse
  import datetime
  import io
  from nltk.translate import bleu_score
  import numpy
  import progressbar
  import six
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import training
  from chainer.training import extensions
  import chainerx
label_desc: Use image node_id 7 for calling a global function with example usage: calculate_unknown_ratio(data) and returns: unknown