Format any feature.
511117
def _format_feature(feature, weight, hl_spaces):
    # type: (...) -> str
    
    if isinstance(feature, FormattedFeatureName):
        return feature.format()
    elif (isinstance(feature, list) and
            all('name' in x and 'sign' in x for x in feature)):
        return _format_unhashed_feature(feature, weight, hl_spaces=hl_spaces)
    else:
        return _format_single_feature(feature, weight, hl_spaces=hl_spaces)
788232
def format_for_columns(pkgs, options):
    
    running_outdated = options.outdated
    # Adjust the header for the `pip list --outdated` case.
    if running_outdated:
        header = ["Package", "Version", "Latest", "Type"]
    else:
        header = ["Package", "Version"]

    data = []
    if options.verbose >= 1 or any(dist_is_editable(x) for x in pkgs):
        header.append("Location")
    if options.verbose >= 1:
        header.append("Installer")

    for proj in pkgs:
        # if we're working on the 'outdated' list, separate out the
        # latest_version and type
        row = [proj.project_name, proj.version]

        if running_outdated:
            row.append(proj.latest_version)
            row.append(proj.latest_filetype)

        if options.verbose >= 1 or dist_is_editable(proj):
            row.append(proj.location)
        if options.verbose >= 1:
            row.append(get_installer(proj))

        data.append(row)

    return data, header
842808
def stylize(text, styles, reset=True):
    """"""
    terminator = attr("reset") if reset else ""
    return "{}{}{}".format("".join(styles), text, terminator)
467568
def process_docstring(app, what, name, obj, options, lines):
    """"""
    # pylint: disable=unused-argument
    # pylint: disable=too-many-arguments
    lines.extend(_format_contracts(what=what, obj=obj))
242098
function formatFeature(feature) {
	return Object.assign({}, feature, {
		// format title using marked inline lexer
		title: marked.inlineLexer(feature.title, [], {}),
		// format description using marked inline lexer
		description: marked.inlineLexer(feature.description, [], {}),
		// format example as syntax-highlighted html
		example: postcss().process(feature.example, {
			stringifier: postcssToHTML
		}).css,
		caniuse: 'caniuse-compat' in feature
			? { stats: feature['caniuse-compat'] }
		: feature.caniuse in caniuse.features
			? trimCaniuseFeatures(caniuse.feature(caniuse.features[feature.caniuse]))
		: false,
		caniuseURL: feature.caniuse
	});
}
332731
def _format_summary(lines, element, spacer="  "):
    """"""
    summary = spacer + element.summary
    if element.summary == "":
        summary = spacer + "No description given in XML documentation for this element."
    lines.append(summary)
1189009
def >>(*args)
      args.to_a.flatten.each do |feature|
        features.delete feature.to_sym
      end
      self
    end
967863
def trim_and_pad_all_features(features, length):
  """"""
  return {k: _trim_and_pad(v, length) for k, v in features.items()}
571531
def format_records(records):
    """"""
    formatted = list()
    for record_ in records:
        formatted.append(format_record(record_))
    return formatted
226592
def set_format_options(fmt, format_options):
    """"""
    if not format_options:
        return

    for opt in format_options:
        try:
            key, value = opt.split('=')
        except ValueError:
            raise ValueError("Format options are expected to be of the form key=value, not '{}'".format(opt))

        if key not in _VALID_FORMAT_OPTIONS:
            raise ValueError("'{}' is not a valid format option. Expected one of '{}'"
                             .format(key, "', '".join(_VALID_FORMAT_OPTIONS)))

        if key in _BINARY_FORMAT_OPTIONS:
            value = str2bool(value)

        fmt[key] = value
1328492
def _format_type(lines, element, spacer=""):
    """"""
    rlines = []
    rlines.append(element.signature)
    _format_summary(rlines, element)

    rlines.append("")
    _format_generic(rlines, element, ["summary"])

    if len(element.executables) > 0:
        rlines.append("\nEMBEDDED PROCEDURES")
        for key, value in list(element.executables.items()):
            rlines.append("  {}".format(value.__str__()))
            target = value.target
            if target is not None:
                _format_executable(rlines, target, "  ")

    if len(element.members) > 0:
        rlines.append("\nEMBEDDED MEMBERS")
        for key, value in list(element.members.items()):
            _format_value_element(rlines, value, "  ")

    lines.extend([spacer + l for l in rlines])
177017
def feature_handler(self, cmd):
        """"""
        feature = cmd.feature_name
        if feature not in commands.FEATURE_NAMES:
            self.warning("feature %s is not supported - parsing may fail"
                % (feature,))
642420
def set_format(self, column_or_columns, formatter):
        """"""
        if inspect.isclass(formatter):
            formatter = formatter()
        if callable(formatter) and not hasattr(formatter, 'format_column'):
            formatter = _formats.FunctionFormatter(formatter)
        if not hasattr(formatter, 'format_column'):
            raise Exception('Expected Formatter or function: ' + str(formatter))
        for label in self._as_labels(column_or_columns):
            if formatter.converts_values:
                self[label] = formatter.convert_column(self[label])
            self._formats[label] = formatter
        return self
1309262
def format(self, record):
        """"""
        if record.levelno == logging.DEBUG:
            record.msg = ' {}'.format(record.msg)
        return super(AuditLogFormatter, self).format(record)
37450
async def format(self, fstype, *, uuid=None):
        """"""
        self._data = await self._handler.format(
            system_id=self.node.system_id, id=self.id,
            fstype=fstype, uuid=uuid)
324992
def format(self, **kwargs):
        """"""
        attrs = self._attrs.copy()
        attrs.update(kwargs)
        lat, lon = self.lat_lon
        return type(self)(lat, lon, **attrs)
709131
def friendly_format(self):
        """"""
        if self.description is not None:
            msg = self.description
        else:
            msg = 'errorCode: {} / detailCode: {}'.format(
                self.errorCode, self.detailCode
            )
        return self._fmt(self.name, msg)