code: def _set_instance_ip(self):
          
          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
              )
docs: Retrieve and set the instance ip address.