@gen.coroutine
  def _Update(self):

    @gen.coroutine
    def _RemoveContact(contact_to_remove):
      """Insert a 'removed' contact with the same contact_id as the one being removed and then
      delete the actual contact that's being removed."""
      removed_contact = Contact.CreateRemovedContact(contact_to_remove.user_id,
                                                     contact_to_remove.contact_id,
                                                     self._notify_timestamp)
      yield gen.Task(removed_contact.Update, self._client)
      yield Operation.TriggerFailpoint(self._client)
      yield gen.Task(contact_to_remove.Delete, self._client)

    # First, take care of deleting garbage collected contacts.
    tasks = [gen.Task(contact.Delete, self._client) for contact in self._contacts_to_delete]

    # We only need to replace present contacts with removed contacts if we're NOT doing a removed contacts reset.
    if not self._removed_contacts_reset:
      # Replace contacts being removed with contacts that have a remove label.
      for contact in self._contacts_to_remove:
        tasks.append(_RemoveContact(contact))

    yield tasks
Return the resource corresponding to all goals
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/remove_contacts_op.py/RemoveContactsOperation._Update--crossover with--dataset/ETHPy150Open ducksboard/libsaas/libsaas/services/pipedrive/service.py/Pipedrive.goals