code: def rename_doubles_from_list(metric_names: List) -> List:
      """
      This function takes a list in the format `['a', ['b', 'a'], 'c', 'a', 'c']`
      and returns a list where each double is added a number so that there are no
      more doubles in the list: `['a1', ['b', 'a2'], 'c1', 'a3', 'c2']`. It does so
      using the provided counts and using the numbering Counter object.
      """
      counts = Counter(flatten_metric_names(metric_names))
      numbering = Counter()
  
      def get_name(name):
          if counts[name] > 1:
              numbering[name] += 1
              return name + str(numbering[name])
          return name
  
      return [
          [get_name(name) for name in names]
          if not isinstance(names, str)
          else get_name(names)
          for names in metric_names
      ]
  
file_path: poutyne/poutyne/framework/metrics/utils.py
imports: import re
  from collections import Counter
  from typing import List, Tuple
label_desc: Use image node_id 5 for calling a global function with example usage: rename_doubles_from_list(metric_names) and returns: unknown, name, unknown