def is_all_tenants(search_opts):
 all_tenants = search_opts.get('all_tenants')
 if all_tenants:
  try:
   all_tenants = strutils.bool_from_string(all_tenants, True)
  except ValueError as err:
   raise exception.InvalidInput(six.text_type(err))
 else:
  all_tenants = ('all_tenants' in search_opts)
 return all_tenants

def is_all_tenants ( search_opts ) : all_tenants = search_opts . get ( 'all_tenants' ) if all_tenants : try : all_tenants = strutils . bool_from_string ( all_tenants , True ) except ValueError as err : raise exception . InvalidInput ( six . text_type ( err ) ) else : all_tenants = ( 'all_tenants' in search_opts ) return all_tenants
checks to see if the all_tenants flag is in search_opts .