def unquote_plus(bs):
    """Bytes version of urllib.parse.unquote_plus."""
    bs = bs.replace(b'+', b' ')
    atoms = bs.split(b'%')
    for i in range(1, len(atoms)):
        item = atoms[i]
        try:
            pct = int(item[:2], 16)
            atoms[i] = bytes([pct]) + item[2:]
        except ValueError:
            pass
    return b''.join(atoms)
