; or (B) any other grant administered by the Department of Justice or the Department of Homeland Security that is substantially related to law enforcement, terrorism, national security, immigration, or naturalization. (2) Exception A political subdivision is not found not to be in compliance with subsection (a) or (b) as a consequence of being required to comply with a statute or other legal requirement of a State or another political subdivision with jurisdiction over that political subdivision, and shall remain eligible to receive grant funds described in paragraph (1). In the case described in the previous sentence, the State or political subdivision that enacted the statute or other legal requirement shall not be eligible to receive such funds. (3) Transfer of custody of aliens pending removal proceedings The Secretary, at the Secretary’s discretion, may decline to transfer an alien in the custody of the Department of Homeland Security to a State or political subdivision of a State found not to be in compliance with subsection (a) or (b), regardless of whether the State or political subdivision of the State has issued a writ or warrant. (4) Transfer of custody of certain aliens prohibited The Secretary shall not transfer an alien with a final order of removal pursuant to paragraph (1)(A) or (5) of section 241(a) of the Immigration and Nationality Act ( 8 U.S.C. 1231(a) ) to a State or a political subdivision of a State that is found not to be in compliance with subsection (a) or (b). (5) Annual determination The Secretary shall determine for each calendar year which States or political subdivision of States are not in compliance with subsection (a) or (b) and shall report such determinations to Congress by March 1 of each succeeding calendar year. (6) Reports The Secretary of Homeland Security shall issue a report concerning the compliance with subsections (a) and (b) of any particular State or political subdivision of a State at the request of the House or the Senate Judiciary Committee. Any jurisdiction