code: def _repeat_iter(input_iter):
      
      last_value = None
      for value in input_iter:
          last_value = value
          yield value
      if last_value is not None:
          while True:
              yield last_value
docs: Iterate over the input iter values. Then repeat the last value
      indefinitely. This is useful to repeat seed values when an insufficient
      number of seeds are provided.
  
      E.g. KISS(1) effectively becomes KISS(1, 1, 1, 1), rather than (if we just
      used default values) KISS(1, default-value, default-value, default-value)
  
      It is better to repeat the last seed value, rather than just using default
      values. Given two generators seeded with an insufficient number of seeds,
      repeating the last seed value means their states are more different from
      each other, with less correlation between their generated outputs.