code: def parse_modes(modes, targets=None, noargs=''):
      
      if not targets:
          targets = []
      cleaned = []
      for mode in modes:
          if mode in '-+':
              char = mode
              continue
          target = targets.pop(0) if mode not in noargs else None
          cleaned.append((char, mode, target))
      return cleaned
docs: Parse channel modes:
  
      .. code-block:: python
  
          >>> parse_modes('+c-n', noargs='cn')
          [('+', 'c', None), ('-', 'n', None)]
          >>> parse_modes('+c-v', ['gawel'], noargs='c')
          [('+', 'c', None), ('-', 'v', 'gawel')]