(b)
Mandatory Revocation for Possession of Controlled Substance or Firearm or Refusal To Comply With Drug Testing.—
If the defendant—
(1)
possesses a controlled substance in violation of the condition set forth in section
3563
(a)(3);
(2)
possesses a firearm, as such term is defined in section
921 of this title, in violation of Federal law, or otherwise violates a condition of probation prohibiting the defendant from possessing a firearm;
(3)
refuses to comply with drug testing, thereby violating the condition imposed by section
3563
(a)(4); or
(4)
as a part of drug testing, tests positive for illegal controlled substances more than 3 times over the course of 1 year;
the court shall revoke the sentence of probation and resentence the defendant under subchapter A to a sentence that includes a term of imprisonment.