; and (B) from funds made available for such program under the heading Distance Learning, Telemedicine, and Broadband Program under the heading Rural Utilities Service under title I of division J of the Infrastructure Investment and Jobs Act, (6) any grant received from a State, territory, Tribal government, or unit of local government to the extent such grant was— (A) funded by amounts provided to the State or local government under section 602, 603, or 604 of the Social Security Act, and (B) provided for the stated purposes of making investments in broadband infrastructure, or (7) any grant or subgrant received under section 905 of division N of the Consolidated Appropriations Act, 2021. (d) Regulations The Secretary shall issue such regulations or other guidance as may be necessary or appropriate to carry out the purposes of this section. . (b) Clerical amendment The table of sections for part III of subchapter B of chapter 1 of the Internal Revenue Code of 1986 is amended by inserting after the item related to section 139I the following new item: Sec. 139J. Certain broadband grants. . (c) Effective date The amendments made by this section shall apply to amounts received in taxable years ending after March 11, 2021.