docs: def set_line_country_tags(network):
      """
      Set country tag for AC- and DC-lines. 
  
      Parameters
      ----------
      network : :class:`pypsa.Network
          Overall container of PyPSA
  
  
      """ 
  
      transborder_lines_0 = network.lines[network.lines['bus0'].isin(
              network.buses.index[network.buses['country_code'] != 'DE'])].index
      transborder_lines_1 = network.lines[network.lines['bus1'].isin(
              network.buses.index[network.buses['country_code']!= 'DE'])].index
      #set country tag for lines
      network.lines.loc[transborder_lines_0, 'country'] = \
          network.buses.loc[network.lines.loc[transborder_lines_0, 'bus0']\
                            .values, 'country_code'].values
      
      network.lines.loc[transborder_lines_1, 'country'] = \
          network.buses.loc[network.lines.loc[transborder_lines_1, 'bus1']\
                            .values, 'country_code'].values
      network.lines['country'].fillna('DE', inplace=True)
      doubles = list(set(transborder_lines_0.intersection(transborder_lines_1)))
      for line in doubles:
          c_bus0 = network.buses.loc[network.lines.loc[line, 'bus0'], 'country']
          c_bus1 = network.buses.loc[network.lines.loc[line, 'bus1'], 'country']
          network.lines.loc[line, 'country'] = '{}{}'.format(c_bus0, c_bus1)
      
      transborder_links_0 = network.links[network.links['bus0'].isin(
              network.buses.index[network.buses['country_code']!= 'DE'])].index
      transborder_links_1 = network.links[network.links['bus1'].isin(
              network.buses.index[network.buses['country_code'] != 'DE'])].index
  
      #set country tag for links
      network.links.loc[transborder_links_0, 'country'] = \
          network.buses.loc[network.links.loc[transborder_links_0, 'bus0']\
                            .values, 'country_code'].values
  
      network.links.loc[transborder_links_1, 'country'] = \
          network.buses.loc[network.links.loc[transborder_links_1, 'bus1']\
                            .values, 'country_code'].values
      network.links['country'].fillna('DE', inplace=True)
      doubles = list(set(transborder_links_0.intersection(transborder_links_1)))
      for link in doubles:
          c_bus0 = network.buses.loc[network.links.loc[link, 'bus0'], 'country']
          c_bus1 = network.buses.loc[network.links.loc[link, 'bus1'], 'country']
          network.links.loc[link, 'country'] = '{}{}'.format(c_bus0, c_bus1)