code: def test_make_output_dirs_if_needed_make_path(makedirs):
      output_dir = "dir"
      output_path = os.path.join(output_dir, "output.py")
  
      updater = files.FileUpdater("input.py", output_path)
      updater._make_output_dirs_if_needed()
  
      makedirs.assert_called_with(output_dir)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/cli/compatibility/v2/test_file_updaters.py
imports: from __future__ import absolute_import
  import json
  import os
  from mock import call, Mock, mock_open, patch
  from sagemaker.cli.compatibility.v2 import files
label_desc: Use image node_id 2 for calling a global function with example usage: test_make_output_dirs_if_needed_make_path(makedirs) without return types