code: def set_up_storage(node, parameters,
                     voltage_level=None, operational_mode=None):
      
  
      # if node the storage is connected to is an LVStation voltage_level
      # defines which side the storage is connected to
      if isinstance(node, LVStation):
          if voltage_level == 'lv':
              grid = node.grid
          elif voltage_level == 'mv':
              grid = node.mv_grid
          else:
              raise ValueError(
                  "{} is not a valid option for voltage_level.".format(
                      voltage_level))
      else:
          grid = node.grid
  
      return Storage(operation=operational_mode,
                     id='{}_storage_{}'.format(grid,
                                               len(grid.graph.nodes_by_attribute(
                                                   'storage')) + 1),
                     grid=grid,
                     geom=node.geom,
                     **parameters)
docs: Sets up a storage instance.
  
      Parameters
      ----------
      node : :class:`~.grid.components.Station` or :class:`~.grid.components.BranchTee`
          Node the storage will be connected to.
      parameters : :obj:`dict`, optional
          Dictionary with storage parameters. Must at least contain
          'nominal_power'. See :class:`~.grid.network.StorageControl` for more
          information.
      voltage_level : :obj:`str`, optional
          This parameter only needs to be provided if `node` is of type
          :class:`~.grid.components.LVStation`. In that case `voltage_level`
          defines which side of the LV station the storage is connected to. Valid
          options are 'lv' and 'mv'. Default: None.
      operational_mode : :obj:`str`, optional
          Operational mode. See :class:`~.grid.network.StorageControl` for
          possible options and more information. Default: None.