docs: def set_branch_capacity(network, args):
  
      """
      Set branch capacity factor of lines and transformers, different factors for
      HV (110kV) and eHV (220kV, 380kV).
  
      Parameters
      ----------
      network : :class:`pypsa.Network
          Overall container of PyPSA
      args: dict
          Settings in appl.py
  
      """
  
      network.lines["s_nom_total"] = network.lines.s_nom.copy()
  
      network.transformers["s_nom_total"] = network.transformers.s_nom.copy()
  
      network.lines["v_nom"] = network.lines.bus0.map(
          network.buses.v_nom)
      network.transformers["v_nom0"] = network.transformers.bus0.map(
          network.buses.v_nom)
  
      network.lines.s_nom[network.lines.v_nom == 110] = \
          network.lines.s_nom * args['branch_capacity_factor']['HV']
  
      network.lines.s_nom[network.lines.v_nom > 110] = \
          network.lines.s_nom * args['branch_capacity_factor']['eHV']
  
      network.transformers.s_nom[network.transformers.v_nom0 == 110]\
          = network.transformers.s_nom * args['branch_capacity_factor']['HV']
  
      network.transformers.s_nom[network.transformers.v_nom0 > 110]\
          = network.transformers.s_nom * args['branch_capacity_factor']['eHV']