<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def storages_timeseries(self):
 """ Returns a dataframe with storage time series. Returns ------- :pandas:`pandas.DataFrame<dataframe>` Dataframe containing time series of all storages installed in the MV grid and LV grids. Index of the dataframe is a :pandas:`pandas.DatetimeIndex<datetimeindex>`. Columns are the storage representatives. """

        storages_p = pd.DataFrame()
        storages_q = pd.DataFrame()
        grids = [self.network.mv_grid] + list(self.network.mv_grid.lv_grids)
        for grid in grids:
            for storage in grid.graph.nodes_by_attribute('storage'):
                ts = storage.timeseries
                storages_p[repr(storage)] = ts.p
                storages_q[repr(storage)] = ts.q

        return storages_p, storages_q