code: def calculate_and_log_out(self, fetch_list, info=""):
      loss = np.mean(np.array(fetch_list[0]))
      pred = np.array(fetch_list[1])
      label = np.array(fetch_list[2])
      hit_at_one = youtube8m_metrics.calculate_hit_at_one(pred, label)
      perr = youtube8m_metrics.calculate_precision_at_equal_recall_rate(
          pred, label
      )
      gap = youtube8m_metrics.calculate_gap(pred, label)
      logger.info(
          info
          + " , loss = {0}, Hit@1 = {1}, PERR = {2}, GAP = {3}".format(
              "%.6f" % loss,
              "%.2f" % hit_at_one,
              "%.2f" % perr,
              "%.2f" % gap,
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import unicode_literals
  from __future__ import print_function
  from __future__ import division
  import io
  import logging
  import numpy
  from videotag_tsn_lstm.resource.metrics.youtube8m import eval_util
label_desc: Use image node_id 2 for calling the Youtube8mMetrics obj's underlying member method code with example usage: obj.calculate_and_log_out(fetch_list, info) without return types