This may not seem like the ideal place, but is actually the only place in py/ where it gets referenced, so is just right.
This file contains various MicroPython-specific helper functions, so isn't good fit for lib/libc/.