A subtask of #24169.
A subtask of #24169.