Please add dosctrings since this function is in the public API.