code: def constant(interval=1):
      
      try:
          itr = iter(interval)
      except TypeError:
          itr = itertools.repeat(interval)
  
      for val in itr:
          yield val
docs: Generator for constant intervals.
  
      Args:
          interval: A constant value to yield or an iterable of such values.