This entity, more commonly a djinn, locked in a lamp or some such contraption, will grant wishes, usually three, in exchange for its freedom. This trope, after featuring in One Thousand and One ...