Replace any_instance with allow_any_instance_of