Let the user select a scheme
 Use a scheme containing the preferred_to_include string when multiple schemes were found
546753
def select_scheme(preferred_to_include: nil)
      if options[:scheme].to_s.length > 0
        # Verify the scheme is available
        unless schemes.include?(options[:scheme].to_s)
          UI.error("Couldn't find specified scheme '#{options[:scheme]}'. Please make sure that the scheme is shared, see https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/ConfigureBots.html#//apple_ref/doc/uid/TP40013292-CH9-SW3")
          options[:scheme] = nil
        end
      end

      return if options[:scheme].to_s.length > 0

      if schemes.count == 1
        options[:scheme] = schemes.last
      elsif schemes.count > 1
        preferred = nil
        if preferred_to_include
          preferred = schemes.find_all { |a| a.downcase.include?(preferred_to_include.downcase) }
        end

        if preferred_to_include && preferred.count == 1
          options[:scheme] = preferred.last
        elsif automated_scheme_selection? && schemes.include?(project_name)
          UI.important("Using scheme matching project name (#{project_name}).")
          options[:scheme] = project_name
        elsif Helper.ci?
          UI.error("Multiple schemes found but you haven't specified one.")
          UI.error("Since this is a CI, please pass one using the `scheme` option")
          show_scheme_shared_information
          UI.user_error!("Multiple schemes found")
        else
          puts("Select Scheme: ")
          options[:scheme] = choose(*schemes)
        end
      else
        show_scheme_shared_information

        UI.user_error!("No Schemes found")
      end
    end
480245
def is_attr_selected(attr_name,     # type: str
                     include=None,  # type: Union[str, Tuple[str]]
                     exclude=None   # type: Union[str, Tuple[str]]
                     ):
    """"""

    if include is not None and exclude is not None:
        raise ValueError('Only one of \'include\' or \'exclude\' argument should be provided.')

    # win time by not doing this
    # check_var(include, var_name='include', var_types=[str, tuple], enforce_not_none=False)
    # check_var(exclude, var_name='exclude', var_types=[str, tuple], enforce_not_none=False)

    if attr_name is 'self':
        return False
    if exclude and attr_name in exclude:
        return False
    if not include or attr_name in include:
        return True
    else:
        return False
48390
def _filter_plans(attr, name, plans):
    '''
    
    '''
    return [plan for plan in plans if plan[attr] == name]
648265
def selectNone( self ):
        
        currLayer = self._currentLayer
        for item in self.items():
            layer = item.layer()
            if ( layer == currLayer or not layer ):
                item.setSelected(False)
343152
private void choose(String argument, String desc, Chooser chooser) {
        StringTokenizer tok = new StringTokenizer(argument, ",");
        while (tok.hasMoreTokens()) {
            String what = tok.nextToken().trim();
            if (!what.startsWith("+") && !what.startsWith("-")) {
                throw new IllegalArgumentException(desc + " must start with " + "\"+\" or \"-\" (saw " + what + ")");
            }
            boolean enabled = what.startsWith("+");
            chooser.choose(enabled, what.substring(1));
        }
    }
807347
def _parse_selections(dpkgselection):
    '''
    
    '''
    ret = {}
    if isinstance(dpkgselection, six.string_types):
        dpkgselection = dpkgselection.split('\n')
    for line in dpkgselection:
        if line:
            _pkg, _state = line.split()
            if _state in ret:
                ret[_state].append(_pkg)
            else:
                ret[_state] = [_pkg]
    return ret
98265
def hack_find_packages(include_str):
    
    new_list = [include_str]
    for element in find_packages(include_str):
        new_list.append(include_str + '.' + element)

    return new_list
267193
def select_defined(args)
      args.select { |k, v| (ATTRS.include? k) && !v.nil? }
    end
582333
def include_feature(self, name):
        """'"""

        if self.feature_is_included(name) == 0:
            descr = self.features[name].description
            raise DistutilsOptionError(
                descr + " is required, but was excluded or is not available"
            )
        self.features[name].include_in(self)
        self._set_feature(name, 1)
1320329
def include(self):
        
        include_param = self.qs.get('include', [])

        if current_app.config.get('MAX_INCLUDE_DEPTH') is not None:
            for include_path in include_param:
                if len(include_path.split('.')) > current_app.config['MAX_INCLUDE_DEPTH']:
                    raise InvalidInclude("You can't use include through more than {} relationships"
                                         .format(current_app.config['MAX_INCLUDE_DEPTH']))

        return include_param.split(',') if include_param else []
1008713
def _add_scheme():
    
    lists = [
        urllib.parse.uses_relative,
        urllib.parse.uses_netloc,
        urllib.parse.uses_query,
    ]
    for l in lists:
        l.append('mongodb')
1173021
public void setScheme( String scheme )
    {
        _scheme = null;
        if ( scheme != null && scheme.length() > 0 )
        {
            _scheme = scheme;
        }
    }
1108761
def select(self, cond, multiple=False):
        

        return self.selectImpl(cond, multiple, self.getRoot(), 9999, True, True)
108169
void allowedOptions(String... opts) {
        for (String opt : opts) {
            options.putIfAbsent(opt, false);
        }
    }
782365
def p_include(p):
    
    if ENABLED:
        p[0] = include_file(p[2], p.lineno(2), local_first=True)
    else:
        p[0] = []
        p.lexer.next_token = '_ENDFILE_'
170848
def select(self, names):
        """"""
        return PolicyCollection(
            [p for p in self.policies if p.name in names], self.options)
470825
def select_options(self, options_prefix):
		
		return WConfigSelection(
			self.config(), self.section(), self.option_prefix() + options_prefix
		)