def get_cup_metric(name):
 for metric in cup_metrics:
  if (metric.__name__.lower() == name.lower()):
   return metric
 raise AttributeError

def get_cup_metric ( name ) : for metric in cup_metrics : if ( metric . __name__ . lower ( ) == name . lower ( ) ) : return metric raise AttributeError
gets metric by name from list in this module .