code: def handle_keys(self, key_collection, **kwargs):
      key_collection_set = set(key_collection)
  
      keys_to_press = (
          key_collection_set - self.previous_key_collection_set
      )
      keys_to_release = (
          self.previous_key_collection_set - key_collection_set
      )
  
      for key in keys_to_press:
          self.press_key(key, **kwargs)
  
      for key in keys_to_release:
          self.release_key(key, **kwargs)
  
      self.previous_key_collection_set = key_collection_set
  
imports: from serpent.input_controller import InputController, MouseButton, KeyboardKey, character_keyboard_key_mapping
  from serpent.sprite_locator import SpriteLocator
  import time
  import ctypes
  import win32api
  import scipy.interpolate
  import numpy
label_desc: Use image node_id 2 for calling the NativeWin32InputController obj's underlying member method code with example usage: obj.handle_keys(key_collection) without return types