code: def _check_nominal_power(self, storage_parameters, timeseries):
          
          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
docs: 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.