def METHOD_NAME(s: str) -> bytearray:
    try:
        assert len(s) % 2 == 0
        return bytearray(int(s[i:i + 2], 16) for i in range(0, len(s), 2))
    except Exception:
        raise ValueError(s)