code: def _extract_curve_feature_log(arg):
      """extract sampled curve feature for log items"""
      inp, res = arg
      config = inp.config
      with inp.target:
          sch, args = inp.task.instantiate(config)
      fea = feature.get_buffer_curve_sample_flatten(
          sch, args, sample_n=20
      )
      x = np.concatenate(
          (fea, list(config.get_other_option().values()))
      )
  
      if res.error_no == 0:
          y = inp.task.flop / np.mean(res.costs)
      else:
          y = 0.0
      return x, y
  
imports: import logging
  import time
  from typing import Dict
  import numpy
  from tvm.contrib.popen_pool import PopenPoolExecutor, StatusKind
  from ..None import feature
  from ..utils import get_rank
  from .metric import cover_curve, max_curve, recall_curve
  from .model_based_tuner import CostModel, FeatureCache
label_desc: Use image node_id 7 for calling a global function with example usage: _extract_curve_feature_log(arg) and returns: x,  y