def ec2_id_to_id(ec2_id):
    """Convert an ec2 ID (i-[base 16 number]) to an instance id (int)"""
    try:
        return int(ec2_id.split('-')[-1], 16)
    except __HOLE__:
        raise exception.InvalidEc2Id(ec2_id=ec2_id)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/ec2/ec2utils.py/ec2_id_to_id