The containing class is available as SQL\QueryFormat in the www repository.
SQL\QueryFormat
public function format_upcase_q( HH\Lib\SQL\Query $q, ): string;
HH\Lib\SQL\Query
$q
string