<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_nominal_power(self, storage_parameters, timeseries):
 """ Tries to assign a nominal power to the storage. Checks if nominal power is provided through `storage_parameters`, otherwise tries to return the absolute maximum of `timeseries`. Raises an error if it cannot assign a nominal power. Parameters timeseries : :obj:`str` or :pandas:`pandas.Series<series>` See parameter `timeseries` in class definition for more information. storage_parameters : :obj:`dict` See parameter `parameters` in class definition for more information. Returns -------- :obj:`dict` The given `storage_parameters` is returned extended by an entry for 'nominal_power', if it didn't already have that key. """

        if storage_parameters.get('nominal_power', None) is None:
            try:
                storage_parameters['nominal_power'] = max(abs(timeseries))
            except:
                raise ValueError("Could not assign a nominal power to the "
                                 "storage. Please provide either a nominal "
                                 "power or an active power time series.")
        return storage_parameters