docs: def select_connected_bonds():
      '''Select the bonds connected to the currently selected atoms.'''
      s = current_system()
      start, end = s.bonds.transpose()
      selected = np.zeros(s.n_bonds, 'bool')
      for i in selected_atoms():
          selected |= (i == start) | (i == end)
  
      csel = current_selection()
      bsel = csel['bonds'].add(
          Selection(selected.nonzero()[0], s.n_bonds))
      
      ret = csel.copy()
      ret['bonds'] = bsel
  
      return select_selection(ret)