code: def thub(data, n):
    
    return StreamTeeHub(data, n) if isinstance(data, Iterable) else data
docs: Tee or "T" hub auto-copier to help working with Stream instances as well as
    with numbers.
  
    Parameters
    ----------
    data :
      Input to be copied. Can be anything.
    n :
      Number of copies.
  
    Returns
    -------
    A StreamTeeHub instance, if input data is iterable.
    The data itself, otherwise.
  
    Examples
    --------
  
    >>> def sub_sum(x, y):
    ...   x = thub(x, 2) # Casts to StreamTeeHub, when needed
    ...   y = thub(y, 2)
    ...   return (x - y) / (x + y) # Return type might be number or Stream
  
    With numbers:
  
    >>> sub_sum(1, 1.)
    0.0
  
    Combining number with iterable:
  
    >>> sub_sum(3., [1, 2, 3])
    <audiolazy.lazy_stream.Stream object at 0x...>
    >>> list(sub_sum(3., [1, 2, 3]))
    [0.5, 0.2, 0.0]
  
    Both iterables (the Stream input behaves like an endless [6, 1, 6, 1, ...]):
  
    >>> list(sub_sum([4., 3., 2., 1.], [1, 2, 3]))
    [0.6, 0.2, -0.2]
    >>> list(sub_sum([4., 3., 2., 1.], Stream(6, 1)))
    [-0.2, 0.5, -0.5, 0.0]
  
    This function can also be used as a an alternative to the Stream
    constructor when your function has only one parameter, to avoid casting
    when that's not needed:
  
    >>> func = lambda x: 250 * thub(x, 1)
    >>> func(1)
    250
    >>> func([2] * 10)
    <audiolazy.lazy_stream.Stream object at 0x...>
    >>> func([2] * 10).take(5)
    [500, 500, 500, 500, 500]