def find_address(ec2, public_ip, device_id, isinstance=True):
 if public_ip:
  return _find_address_by_ip(ec2, public_ip)
 elif (device_id and isinstance):
  return _find_address_by_device_id(ec2, device_id)
 elif device_id:
  return _find_address_by_device_id(ec2, device_id, isinstance=False)

def find_address ( ec2 , public_ip , device_id , isinstance = True ) : if public_ip : return _find_address_by_ip ( ec2 , public_ip ) elif ( device_id and isinstance ) : return _find_address_by_device_id ( ec2 , device_id ) elif device_id : return _find_address_by_device_id ( ec2 , device_id , isinstance = False )
find an existing elastic ip address .