Given that the soup is a container:

if fly in soup:
  tell_the_waiter()

We search the soup for any fly (i.e. Is that a fly in my soup?)

Implementation

For our example below, we have a KidsMovie class that can suggest which age range of kids might enjoy this particular movie:

You only need to implement this method:

  • __contains__()

Code

Class diagram for people who enjoy their UMLs: