code: def test_change_dir_permission(mock_subprocess_run):
      RuntimeEnvironmentManager().change_dir_permission(
          dirs=["a", "b", "c"], new_permission="777"
      )
      expected_command = ["sudo", "chmod", "-R", "777", "a", "b", "c"]
      assert mock_subprocess_run.called_once_with(
          expected_command, check=True, stderr=subprocess.PIPE
      )
  
imports: from __future__ import absolute_import
  import subprocess
  import pytest
  from mock import patch, Mock
  import sys
  import shlex
  import os
  from mock.mock import MagicMock
  from sagemaker.remote_function.runtime_environment.runtime_environment_manager import RuntimeEnvironmentManager, RuntimeEnvironmentError
label_desc: Use image node_id 22 for calling a global function with example usage: test_change_dir_permission(mock_subprocess_run) without return types