Sharing Models or Coresets: A Study based on Membership Inference Attack