original_docstring: Produce scattered hint labels with variable length (like Vimium).
  
          Args:
              min_chars: The minimum length of labels.
              chars: The alphabet to use for labels.
              elems: The elements to generate labels for.
          
docstring: Produce scattered hint labels with variable length (like Vimium).
docstring_tokens: Produce scattered hint labels with variable length ( like Vimium ) .
code: def _hint_scattered(self, min_chars: int,
                          chars: str,
                          elems: _ElemsType) -> _HintStringsType:
          """Produce scattered hint labels with variable length (like Vimium).
  
          Args:
              min_chars: The minimum length of labels.
              chars: The alphabet to use for labels.
              elems: The elements to generate labels for.
          """
          # Determine how many digits the link hints will require in the worst
          # case. Usually we do not need all of these digits for every link
          # single hint, so we can show shorter hints for a few of the links.
          needed = max(min_chars, utils.ceil_log(len(elems), len(chars)))
  
          # Short hints are the number of hints we can possibly show which are
          # (needed - 1) digits in length.
          if needed > min_chars and needed > 1:
              total_space = len(chars) ** needed
              # For each 1 short link being added, len(chars) long links are
              # removed, therefore the space removed is len(chars) - 1.
              short_count = (total_space - len(elems)) // (len(chars) - 1)
          else:
              short_count = 0
  
          long_count = len(elems) - short_count
  
          strings = []
  
          if needed > 1:
              for i in range(short_count):
                  strings.append(self._number_to_hint_str(i, chars, needed - 1))
  
          start = short_count * len(chars)
          for i in range(start, start + long_count):
              strings.append(self._number_to_hint_str(i, chars, needed))
  
          return self._shuffle_hints(strings, len(chars))
code_tokens: def _hint_scattered ( self , min_chars : int , chars : str , elems : _ElemsType ) -> _HintStringsType : needed = max ( min_chars , utils . ceil_log ( len ( elems ) , len ( chars ) ) ) if needed > min_chars and needed > 1 : total_space = len ( chars ) ** needed short_count = ( total_space - len ( elems ) ) // ( len ( chars ) - 1 ) else : short_count = 0 long_count = len ( elems ) - short_count strings = [ ] if needed > 1 : for i in range ( short_count ) : strings . append ( self . _number_to_hint_str ( i , chars , needed - 1 ) ) start = short_count * len ( chars ) for i in range ( start , start + long_count ) : strings . append ( self . _number_to_hint_str ( i , chars , needed ) ) return self . _shuffle_hints ( strings , len ( chars ) )
short_docstring: Produce scattered hint labels with variable length (like Vimium).
short_docstring_tokens: Produce scattered hint labels with variable length ( like Vimium ) .
comment: """Produce scattered hint labels with variable length (like Vimium).
  
          Args:
              min_chars: The minimum length of labels.
              chars: The alphabet to use for labels.
              elems: The elements to generate labels for.
          """$SEP$# Determine how many digits the link hints will require in the worst$SEP$# case. Usually we do not need all of these digits for every link$SEP$# single hint, so we can show shorter hints for a few of the links.$SEP$# Short hints are the number of hints we can possibly show which are$SEP$# (needed - 1) digits in length.$SEP$# For each 1 short link being added, len(chars) long links are$SEP$# removed, therefore the space removed is len(chars) - 1.