def METHOD_NAME(serviceRecord):
    svc = serviceRecord.Service
    svc.DeleteCachedData(serviceRecord)
    if svc.PartialSyncTriggerRequiresPolling and serviceRecord.PartialSyncTriggerSubscribed:
        svc.UnsubscribeFromPartialSyncTrigger(serviceRecord)
    svc.RevokeAuthorization(serviceRecord)
    cachedb.extendedAuthDetails.remove({"ID": serviceRecord._id})
    db.connections.remove({"_id": serviceRecord._id})