def _fill_deque_by_initial_value(
        deque_obj, initial_value, buffer_size):
    """
    Fill the deque object with the initial value.

    Parameters
    ----------
    deque_obj : collections.deque
        The deque object to add to.
    initial_value : int or float
        Initial value to be referenced.
    buffer_size : int
        Buffer size to handle in the plot.

    Returns
    -------
    deque_obj : collections.deque
        Deque object after adding data.
    """
    if len(deque_obj) != 0:
        return deque_obj
    while len(deque_obj) < buffer_size:
        deque_obj.append(initial_value)
    return deque_obj