Veterinarians said the cobra could have died if the plastic had stayed inside it much longer.