code: def validate_metrics(metrics):
      if not isinstance(metrics, list):
          raise ValueError('Argument "metrics" must be a list')
  
      for metric in metrics:
          if not isinstance(metric, Metric):
              raise ValueError(
                  'Invalid metric: "{}" ({})'.format(
                      str(metric), type(metric)
                  )
              )
  
file_path: small-text/small_text/integrations/pytorch/model_selection.py
imports: import logging
  from collections import OrderedDict
  from pathlib import Path
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.utils.annotations import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: validate_metrics(metrics) without return types