code: def get_hardware_aware_metric(model, hardware_metric):
      """
      Get architectures' hardware-aware metrics
  
      Attributes
      ----------
      model : BaseSpace
          The architecture to be evaluated
      hardware_metric : str
          The name of hardware-aware metric. Can be 'parameter' or 'latency'
      """
  
      if hardware_metric == "parameter":
          return count_parameters(model)
      elif hardware_metric == "latency":
          return measure_latency(model, 20, warmup_iters=5)
      else:
          raise ValueError("Unsupported hardware-aware metric")
  
imports: import logging
  from collections import OrderedDict
  import time
  import numpy
  import torch
  import nni.retiarii.nn.pytorch
  from nni.nas.pytorch.mutables import Mutable, InputChoice, LayerChoice
label_desc: Use image node_id 1 for calling a global function with example usage: get_hardware_aware_metric(model, hardware_metric) and returns: count_parameters, measure_latency