<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_instance_ip(self):
 """Retrieve and set the instance ip address."""

        instance = self._get_instance()

        if instance.public_ips:
            self.instance_ip = instance.public_ips[0]
        elif instance.private_ips:
            self.instance_ip = instance.private_ips[0]
        else:
            raise GCECloudException(
                'IP address for instance: %s cannot be found.'
                % self.running_instance_id
            )