; or (II) losses that are not the result of a negotiated term, including losses resulting from the failure of the Secretary to perform an obligation of the Secretary under this section. ; (E) in paragraph (7)— (i) in subparagraph (A), by striking has demonstrated and inserting the Secretary determines has demonstrated with substantial evidence ; (ii) in subparagraph (B), by striking any tribal remedy and inserting all remedies (if any) provided under the laws of the Indian tribe ; (iii) in subparagraph (D)— (I) in clause (i), by striking determine and all that follows through the end of the clause and inserting the following: determine— (I) whether the petitioner is an interested party; and (II) if the petitioner is an interested party, whether the Indian tribe is not in compliance with the tribal energy resource agreement as alleged in the petition. ; (II) in clause (ii), by striking determination and inserting determinations ; and (III) in clause (iii), in the matter preceding subclause (I) by striking agreement the first place it appears and all that follows through , including and inserting agreement pursuant to clause (i), the Secretary shall only take such action as the Secretary determines necessary to address the claims of noncompliance made in the petition, including ; (iv) in subparagraph (E)(i), by striking the manner in which and inserting , with respect to each claim made in the petition, how ; and (v) by adding at the end the following: (G) Notwithstanding any other provision of this paragraph, the Secretary shall dismiss any petition from an interested party that has agreed with the Indian tribe to a resolution of the claims presented in the petition of that party. ; (F) in paragraph (8)— (i) by striking subparagraph (A); (ii) by redesignating subparagraphs (B) through (D) as subparagraphs (A) through (C), respectively; and (iii) in subparagraph (A) (as redesignated by clause (ii))— (I) in clause (i), by striking and at the end; (II) in clause (ii), by adding and after the semicolon