We're a bit sloppy in this regard, what with all the legacy code scattered about - but I'd put a new function like this in /wpsc-includes/misc-functions.php, probably.