How to search users globally on a multisite install?

It appears you can do this using a blog_id of 0:

$args = array( 'blog_id' => 0 );
$users = get_users( $args );
var_dump( $users );

If you want to search for a specific user, the process is similar:

$args = array( 'blog_id' => 0, 'search' => '{username to search for}' );
$users = get_users( $args );
var_dump( $users );

I discovered this while poking around in the wp-cli source code (since I knew that wp user list --network would return a list of all the users on a Multisite network). It’s corroborated by a user comment on the WP_User_Query::prepare_query() documentation.