docs: def _line_load(network, grid, crit_lines):
      """
      Checks for over-loading issues of lines.
  
      Parameters
      ----------
      network : :class:`~.grid.network.Network`
      grid : :class:`~.grid.grids.LVGrid` or :class:`~.grid.grids.MVGrid`
      crit_lines : :pandas:`pandas.DataFrame<dataframe>`
          Dataframe containing over-loaded lines, their maximum relative
          over-loading and the corresponding time step.
          Index of the dataframe are the over-loaded lines of type
          :class:`~.grid.components.Line`. Columns are 'max_rel_overload'
          containing the maximum relative over-loading as float and 'time_index'
          containing the corresponding time step the over-loading occured in as
          :pandas:`pandas.Timestamp<timestamp>`.
  
      Returns
      -------
      :pandas:`pandas.DataFrame<dataframe>`
          Dataframe containing over-loaded lines, their maximum relative
          over-loading and the corresponding time step.
          Index of the dataframe are the over-loaded lines of type
          :class:`~.grid.components.Line`. Columns are 'max_rel_overload'
          containing the maximum relative over-loading as float and 'time_index'
          containing the corresponding time step the over-loading occured in as
          :pandas:`pandas.Timestamp<timestamp>`.
  
      """
      if isinstance(grid, LVGrid):
          grid_level = 'lv'
      else:
          grid_level = 'mv'
  
      for line in list(grid.graph.lines()):
          i_line_allowed_per_case = {}
          i_line_allowed_per_case['feedin_case'] = \
              line['line'].type['I_max_th'] * line['line'].quantity * \
              network.config['grid_expansion_load_factors'][
                  '{}_feedin_case_line'.format(grid_level)]
          i_line_allowed_per_case['load_case'] = \
              line['line'].type['I_max_th'] * line['line'].quantity * \
              network.config['grid_expansion_load_factors'][
                  '{}_load_case_line'.format(grid_level)]
          # maximum allowed line load in each time step
          i_line_allowed = \
              network.timeseries.timesteps_load_feedin_case.case.apply(
                  lambda _: i_line_allowed_per_case[_])
          try:
              # check if maximum current from power flow analysis exceeds
              # allowed maximum current
              i_line_pfa = network.results.i_res[repr(line['line'])]
              if any((i_line_allowed - i_line_pfa) < 0):
                  # find out largest relative deviation
                  relative_i_res = i_line_pfa / i_line_allowed
                  crit_lines = crit_lines.append(pd.DataFrame(
                      {'max_rel_overload': relative_i_res.max(),
                       'time_index': relative_i_res.idxmax()},
                      index=[line['line']]))
          except KeyError:
              logger.debug('No results for line {} '.format(str(line)) +
                           'to check overloading.')
  
      return crit_lines