Implement a basic class in Python that models a specific real-world system (for example, a simple inventory or booking system). Define an Inventory class that supports adding stock, removing stock only when sufficient quantity exists, and querying current quantity. For grading, implement inventory_operations(operations), which creates an inventory and returns one result per operation. Each operation is a dictionary with action, item, and optional quantity. Add returns True, remove returns whether it succeeded, and get returns the quantity.
def inventory_operations(operations):