code: def metric_instance(
      metric_init_params_lookup,
      metric_init_final_attributes_lookup,
      request,
  ):
      """Instance of `metrics.Metric` initialized with the corresponding values in
      `metric_init_params_lookup`"""
      metric = Metric(*metric_init_params_lookup[request.param])
  
      #################### Ensure Attributes Properly Initialized ####################
      (
          _name,
          _metric_function,
          _direction,
      ) = metric_init_final_attributes_lookup[request.param]
      assert metric.metric_function == _metric_function
      assert metric.direction == _direction
      assert str(metric) == "Metric({}, {}, {})".format(
          _name, _metric_function.__name__, _direction
      )
  
      return metric
  
imports: from hyperparameter_hunter.metrics import ScoringMixIn, Metric, format_metrics, wrap_xgboost_metric
  from hyperparameter_hunter.metrics import get_formatted_target_metric, get_clean_prediction
  from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  import sys
  from sklearn.metrics import roc_auc_score, hamming_loss, r2_score, f1_score
label_desc: Use image node_id 6 for calling a global function with example usage: metric_instance(metric_init_params_lookup, metric_init_final_attributes_lookup, request) and returns: metric