; (ii) based on the totality of the circumstances, the interests of justice dictate that the legal process should be modified or quashed; and (iii) the customer or subscriber is not a United States person and does not reside in the United States. (3) Comity analysis For purposes of making a determination under paragraph (2)(B)(ii), the court shall take into account, as appropriate— (A) the interests of the United States, including the investigative interests of the governmental entity seeking to require the disclosure; (B) the interests of the qualifying foreign government in preventing any prohibited disclosure; (C) the likelihood, extent, and nature of penalties to the provider or any employees of the provider as a result of inconsistent legal requirements imposed on the provider; (D) the location and nationality of the subscriber or customer whose communications are being sought, if known, and the nature and extent of the subscriber or customer’s connection to the United States, or if the legal process has been sought on behalf of a foreign authority pursuant to section 3512, the nature and extent of the subscriber or customer’s connection to the foreign authority’s country; (E) the nature and extent of the provider’s ties to and presence in the United States; (F) the importance to the investigation of the information required to be disclosed; (G) the likelihood of timely and effective access to the information required to be disclosed through means that would cause less serious negative consequences