docstr: Get list of metric classes.
  
  Parameters
  ----------
  cls : Metric
      Metric class.
  names : list
      List of metric names.
  
  Returns
  -------
  metrics : list
      List of metric classes.
docstr_tok: ["Get","list","of","metric","classes",".","Parameters","--","--","--","--","--","cls",":","Metric","Metric","class",".","names",":","list","List","of","metric","names",".","Returns","--","--","--","-","metrics",":","list","List","of","metric","classes","."]
code: def get_metrics_by_names(cls, names):
      """Get list of metric classes.
  
      Parameters
      ----------
      cls : Metric
          Metric class.
      names : list
          List of metric names.
  
      Returns
      -------
      metrics : list
          List of metric classes.
  
      """
      available_metrics = cls.__subclasses__()
      available_names = [metric()._name for metric in available_metrics]
      metrics = []
      for name in names:
          assert (
              name in available_names
          ), f"{name} is not available, choose in {available_names}"
          idx = available_names.index(name)
          metric = available_metrics[idx]()
          metrics.append(metric)
      return metrics
  
imports: from dataclasses import dataclass
  from typing import List
  import numpy
  from sklearn.metrics import roc_auc_score, mean_squared_error, mean_absolute_error, accuracy_score, log_loss, balanced_accuracy_score, mean_squared_log_error
  import torch
label_desc: Use image node_id 2 for calling the Metric obj's underlying member method code with example usage: obj.get_metrics_by_names(cls, names) and returns: metrics