def _GetFixedRequireOrProvideString(self, tokens):

    # A map from required/provided object name to tokens that make up the line
    # it was on, including any comments immediately before it or after it on the
    # same line.
    tokens_map = self._GetTokensMap(tokens)
    sorted_strings = sorted(tokens_map.keys())

    new_order = ''
    for string in sorted_strings:
      for i in tokens_map[string]:
        new_order += i.string
        if i.IsLastInLine():
          new_order += '\n'

    return new_order
Sorts goog.provide or goog.require statements.
dataset/ETHPy150Open google/closure-linter/closure_linter/requireprovidesorter.py/RequireProvideSorter._GetFixedRequireOrProvideString