(1) The Secretary of State -
(a) must keep the search powers code under review, and
(b) may prepare an alteration to the code or a replacement code.
(2) Before preparing an alteration or a replacement code, the Secretary of State must consult the Lord Advocate and such other persons as the Secretary of State considers appropriate.
(3) Section 47AB (other than subsection (4)) applies to an alteration or a replacement code prepared under this section as it applies to a code prepared under section 47AA.
(4) In this section "the search powers code" means the code of practice issued under section 47AB(2) (as altered or replaced from time to time).