This is in no way comprehensive enough to cover all use cases, but hopefully is sufficient to cover the common ones.