docs: def connected_grid_lines(network, busids):
      """ Get grid lines connected to given buses.
  
      Parameters
      ----------
      network : :class:`pypsa.Network
          Overall container of PyPSA
      busids  : list
          List containing bus-ids.
  
      Returns
      -------
      :class:`pandas.DataFrame
          PyPSA lines.
      """
  
      mask = network.lines.bus1.isin(busids) |\
          network.lines.bus0.isin(busids)
  
      return network.lines[mask]