docs: def convert_capital_costs(network, start_snapshot, end_snapshot, p=0.05, T=40):
      """ Convert capital_costs to fit to pypsa and caluculated time
      
      Parameters
      ----------
      network : :class:`pypsa.Network
          Overall container of PyPSA
      p : interest rate, default 0.05
      T : number of periods, default 40 years (source: StromNEV Anlage 1)
      -------
  
      """
      # Add costs for DC-converter
      network.links.capital_cost = network.links.capital_cost + 400000
  
      # Calculate present value of an annuity (PVA)
      PVA = (1 / p) - (1 / (p * (1 + p) ** T))
  
      # Apply function on lines, links, trafos and storages
      # Storage costs are already annuized yearly
      network.lines.loc[network.lines.s_nom_extendable == True,
                        'capital_cost'] = (network.lines.capital_cost /
                        (PVA * (8760 / (end_snapshot - start_snapshot + 1))))
      network.links.loc[network.links.p_nom_extendable == True,
                        'capital_cost'] = network. links.capital_cost /\
                        (PVA * (8760 / (end_snapshot - start_snapshot + 1)))
      network.transformers.loc[network.transformers.s_nom_extendable == True,
                       'capital_cost'] = network.transformers.capital_cost / \
                        (PVA * (8760 / (end_snapshot - start_snapshot + 1)))
      network.storage_units.loc[network.storage_units.p_nom_extendable == True,
                        'capital_cost'] = network.storage_units.capital_cost / \
                                (8760 / (end_snapshot - start_snapshot + 1))
  
      return network