code: def round_f1_weighted(y_true, y_predicted):
      """
      Calculates F1 weighted measure.
  
      Args:
          y_true: list of true values
          y_predicted: list of predicted values
  
      Returns:
          F1 score
  
      Alias:
          f1_weighted
      """
      try:
          predictions = [np.round(x) for x in y_predicted]
      except TypeError:
          predictions = y_predicted
  
      return f1_score(
          np.array(y_true), np.array(predictions), average="weighted"
      )
  
file_path: DeepPavlov/deeppavlov/metrics/fmeasure.py
imports: import itertools
  from collections import OrderedDict
  from itertools import chain
  from logging import getLogger
  import numpy
  from sklearn.metrics import f1_score
  from deeppavlov.core.common.metrics_registry import register_metric
label_desc: Use image node_id 7 for calling a global function with example usage: round_f1_weighted(y_true, y_predicted) and returns: f1_score