; and (2) law enforcement gang-prevention activities. (b) Certification A State or unit of local government may not receive a grant under this section unless— (1) the State or local government— (A) consistently notifies U.S. Immigration and Customs Enforcement before releasing criminal aliens who are unlawfully present in the United States; and (B) allows U.S. Immigration and Customs Enforcement officers to access the detention facilities of the State or local government for the purpose of interviewing or taking into custody an alien described in subparagraph (A); and (2) the Attorney General determines that the State or local government has a cooperative relationship with all Federal immigration authorities, including U.S. Immigration and Customs Enforcement. (c) Program assessment (1) In general Each program using grant funding authorized under this section shall carry out a program assessment, which shall be developed consistent with guidelines established by the Attorney General, in coordination with the National Institute of Justice. (2) Waiver The Attorney General may waive the application of paragraph (1) with respect to a program that, in the opinion of the Attorney General, is not of sufficient size to justify a full program assessment. (d) Prohibited uses Notwithstanding any other provision of this Act, funds provided under this section may not be used, directly or indirectly for— (1) security enhancements or any equipment to any nongovernmental entity that is not engaged in criminal justice or public safety