def get_bdms_to_connect(bdms, exclude_root_mapping=False):
 return (bdm for bdm in bdms if ((bdm.get('boot_index', (-1)) != 0) or (not exclude_root_mapping)))

def get_bdms_to_connect ( bdms , exclude_root_mapping = False ) : return ( bdm for bdm in bdms if ( ( bdm . get ( 'boot_index' , ( - 1 ) ) != 0 ) or ( not exclude_root_mapping ) ) )
will return non-root mappings .