code: def exec_command(cmd, in_data='', chdir=None, shell=None, emulate_tty=False):
      
      assert isinstance(cmd, mitogen.core.UnicodeType)
      return exec_args(
          args=[get_user_shell(), '-c', cmd],
          in_data=in_data,
          chdir=chdir,
          shell=shell,
          emulate_tty=emulate_tty,
      )
docs: Run a command in a subprocess, emulating the argument handling behaviour of
      SSH.
  
      :param bytes cmd:
          String command line, passed to user's shell.
      :param bytes in_data:
          Optional standard input for the command.
      :return:
          (return code, stdout bytes, stderr bytes)