If any bonds remain unsold for six months after having been offered for sale, the board of directors of the district for which the bonds were issued or of a district containing any territory which at the time of the bond election was embraced within the district for which the bonds were issued, may petition the board of supervisors to cause the unsold bonds to be withdrawn from the market and canceled.