pipe-loader: extract a standalone get_driver_descriptor helper function