#NEWLINE# def find_slot( self , wanted , slots = None ) : #NEWLINE# #INDENT# '\n        Searches the given slots or, if not given,\n        active hotbar slot, hotbar, inventory, open window in this order.\n\n        Args:\n            wanted: function(Slot) or Slot or itemID or (itemID, metadata)\n\n        Returns:\n            Optional[Slot]: The first slot containing the item\n                            or None if not found.\n        ' #NEWLINE# for slot in self . find_slots ( wanted , slots ) : #NEWLINE# #INDENT# return slot #NEWLINE# #UNINDENT# return None