'Creates test for removing specific instances.
Args:
names: A list of instance names to be removed.
zone: The zone containing the instances.
Returns:
st.OperationContract'

def terminate_instances(self, names, zone):

    builder = gcp.GcpContractBuilder(self.gcp_observer)
    clause = builder.new_clause_builder('Instances    Deleted', retryable_for_secs=15, strict=True).aggregated_list_resource('instances')
    for name in names:
        name_matches_pred = jp.PathContainsPredicate('name', name)
        is_stopping_pred = jp.PathEqPredicate('status', 'STOPPING')
        clause.AND(ov_factory.value_list_matches([jp.IF(name_matches_pred, is_stopping_pred)], strict=True))
    payload = self.agent.type_to_payload('terminateInstances', {'instanceIds': names, 'zone': zone, 'credentials': self.bindings['SPINNAKER_GOOGLE_ACCOUNT']})
    return st.OperationContract(self.new_post_operation(title='terminate_instances', data=payload, path='gce/ops'), contract=builder.build())
