def _load_metrics(metric_names):
    instantiated_metrics = []
    metrics_map = _get_valid_metric_options()
    possible_metrics = metrics_map.keys()

    for metric in metric_names:
        if metric not in possible_metrics:
            cur_frame = sys._getframe().f_code
            err = "{}.{}: Invalid metric name - {}".format(
            cur_frame.co_filename,
            cur_frame.co_name,
            metric
            )
            raise ValueError(err)

        instantiated_metrics.append(metrics_map[metric]())

    return instantiated_metrics
photos for the currently authenticated user
dataset/ETHPy150Open apache/climate/ocw-ui/backend/processing.py/_load_metrics--crossover with--dataset/ETHPy150Open amarandon/smeuhsocial/apps/photos/views.py/your_photos