The investigation of donor and acceptor states in nanoparticles of the layered semiconductor PbI2