def _assert_instances_are_same(self, instance1, instance2,<EOL>verify_ips=True):
self.assertEquals(instance1.distro, instance2.distro)<EOL>self.assertEquals(instance1.username, instance2.username)<EOL>self.assertEquals(instance1.image_basename, instance2.image_basename)<EOL>self.assertEquals(instance1.region, instance2.region)<EOL>self.assertEquals(instance1.key_filename, instance2.key_filename)<EOL>if verify_ips:<EOL><INDENT>self.assertEquals(instance1.ip_address, instance2.ip_address)<EOL><DEDENT>
Assert that two instance objects probably refer to the same instance.

:param bool verify_ips: Whether we should verify that the instances
    have the same IP. Can be false in situations where you are
    comparing an instance from before an up/down cycle to one after an
    up/down cycle.