def _pypsa_storage_timeseries(network, timesteps, mode=None):
    """
    Timeseries in PyPSA compatible format for storage instances

    Parameters
    ----------
    network : Network
        The eDisGo grid topology model overall container
    timesteps : array_like
        Timesteps is an array-like object with entries of type
        :pandas:`pandas.Timestamp<timestamp>` specifying which time steps
        to export to pypsa representation and use in power flow analysis.
    mode : str, optional
        Specifically retrieve generator time series for MV or LV grid level or
        both. Either choose 'mv' or 'lv'.
        Defaults to None, which returns both timeseries for MV and LV in a
        single DataFrame.

    Returns
    -------
    :pandas:`pandas.DataFrame<dataframe>`
        Time series table in PyPSA format
    """

    mv_storage_timeseries_q = []
    mv_storage_timeseries_p = []
    lv_storage_timeseries_q = []
    lv_storage_timeseries_p = []

    # MV storage time series
    if mode is 'mv' or mode is None:
        for storage in network.mv_grid.graph.nodes_by_attribute('storage'):
            mv_storage_timeseries_q.append(
                storage.pypsa_timeseries('q').rename(
                    repr(storage)).to_frame().loc[timesteps])
            mv_storage_timeseries_p.append(
                storage.pypsa_timeseries('p').rename(
                    repr(storage)).to_frame().loc[timesteps])

    # LV storage time series
    if mode is 'lv' or mode is None:
        for lv_grid in network.mv_grid.lv_grids:
            for storage in lv_grid.graph.nodes_by_attribute('storage'):
                lv_storage_timeseries_q.append(
                    storage.pypsa_timeseries('q').rename(
                        repr(storage)).to_frame().loc[timesteps])
                lv_storage_timeseries_p.append(
                    storage.pypsa_timeseries('p').rename(
                        repr(storage)).to_frame().loc[timesteps])

    storage_df_p = pd.concat(
        mv_storage_timeseries_p + lv_storage_timeseries_p, axis=1)
    storage_df_q = pd.concat(
        mv_storage_timeseries_q + lv_storage_timeseries_q, axis=1)

    return storage_df_p, storage_df_q
Timeseries in PyPSA compatible format for storage instances

    Parameters
    ----------
    network : Network
        The eDisGo grid topology model overall container
    timesteps : array_like
        Timesteps is an array-like object with entries of type
        :pandas:`pandas.Timestamp<timestamp>` specifying which time steps
        to export to pypsa representation and use in power flow analysis.
    mode : str, optional
        Specifically retrieve generator time series for MV or LV grid level or
        both. Either choose 'mv' or 'lv'.
        Defaults to None, which returns both timeseries for MV and LV in a
        single DataFrame.

    Returns
    -------
    :pandas:`pandas.DataFrame<dataframe>`
        Time series table in PyPSA format