def for_entities_in(container):
    """ Receives messages sent to a target inside the specified container.

        :param container: A container whose entities' messages will be received.
    """

    def filter(target):
        if target.container == container: return True
        if target           == container: return True

        return False

    return filter