Statement: In Rogue One, we are introduced to the very witty, sarcastic, a bit morbid droid known as K-2SO. We find out he has been reprogrammed from his original state. And part of the reprogramming removed his internal filter, so he says any morbid little thing that comes to his circuits.
Observation: In the previous extended canon, there was Knights of the Old Republic's HK-47, a very witty, sarcastic, a bit morbid droid that was also reprogrammed a few times. Same lack of filter.
Query: Was K-2SO inspired or based on HK-47?