The run_command function executes a list of commands with specified arguments using the subprocess module, handling potential failures gracefully. It has the following responsibilities:
Accept a list of command strings to execute (commands), along with an args list for command-line arguments, and optional parameters including cwd (current working directory), verbose (for logging failures), hide_stderr (to silence stderr output), and env (to set environment variables).
Attempt to execute each command in the order provided. If a command fails to run (e.g., due to it not being found), it should continue to the next command in the list.
If a command succeeds, it captures the command's standard output as a string and the return code as an integer. If the command fails (non-zero return code), it returns None for the output and the respective return code.
If none of the commands can be executed successfully, it logs this (when verbose is True) and returns None for the output and None for the return code.
Ensure that the function can handle various edge cases such as missing commands and incorrect argument types gracefully.
The solution should be placed in /app/solution.py, and the function must be importable as from solution import run_command.