; (B) at a speed of not more than 25 miles per hour; and (C) on a track with an average track grade of less than 2 percent for any segment of track that is at least 2 continuous miles. (3) Locomotives performing assistance to a train that has incurred mechanical failure or lacks the power to traverse difficult terrain, including traveling to or from the location where assistance is provided. (4) Locomotives that— (A) are not attached to any equipment or attached only to a caboose; and (B) do not travel farther than 30 miles from a rail yard. (5) Train operations staffed with fewer than a 2-person crew at least 1 year prior to the date of enactment of this section, if the Secretary determines that the operation achieves an equivalent level of safety. (c) Trains ineligible for exception The exceptions under subsection (b) may not be applied to— (1) a train transporting 1 or more loaded cars carrying material toxic by inhalation, as defined in section 171.8 of title 49, Code of Federal Regulations; (2) a train carrying 20 or more loaded tank cars of a Class 2 material or a Class 3 flammable liquid in a continuous block or a single train carrying 35 or more loaded tank cars of a Class 2 material or a Class 3 flammable liquid throughout the train consist; and (3) a train with a total length of 7,500 feet or greater. (d) Waiver A railroad carrier may seek a waiver of the requirements of this section pursuant to section 20103(d). . (b) Clerical amendment The analysis for subchapter II of chapter 201 of title 49, United States Code, is amended by adding at the end the following: 20169. Freight train crew size safety standards. . 9510. Safe cross border operations (a) In general Section 416 title IV of division A of the Rail Safety Improvement Act of 2008 ( 49 U.S.C. 20107 note) is amended— (1) by striking Mechanical and brake and inserting (a) In general.— Mechanical and brake