code: def metrics(metrics):
      """Validates if  if there are no duplicated metrics, and if all metrics are valid fairness metrics.
  
      :param metrics: a metric or a list of metrics
      :type metrics: str or list
  
      """
  
      metrics = to_list(metrics)
  
      if len(metrics) != len(set(metrics)):
          raise ValueError(
              f"There is at least one duplicated metric in the metrics list."
          )
  
      for metric in metrics:
          if metric not in METRICS_LIST:
              raise ValueError(f"{metric} is not a valid metric.")
  
file_path: aequitas/src/aequitas/plot/commons/validators.py
imports: from aequitas.plot.commons.style import sizes
  from aequitas.plot.commons.helpers import calculate_chart_size_from_elements, to_list
label_desc: Use image node_id 2 for calling a global function with example usage: metrics(metrics) without return types