def get_by_name_or_id(context, identity):
 if (not uuidutils.is_uuid_like(identity)):
  return get_volume_type_by_name(context, identity)
 return get_volume_type(context, identity)

def get_by_name_or_id ( context , identity ) : if ( not uuidutils . is_uuid_like ( identity ) ) : return get_volume_type_by_name ( context , identity ) return get_volume_type ( context , identity )
retrieves volume type by id or name .