def _find_flavor(cs, flavor):
 try:
  return utils.find_resource(cs.flavors, flavor, is_public=None)
 except exceptions.NotFound:
  return cs.flavors.find(ram=flavor)

def _find_flavor ( cs , flavor ) : try : return utils . find_resource ( cs . flavors , flavor , is_public = None ) except exceptions . NotFound : return cs . flavors . find ( ram = flavor )
get a flavor by name .