code: def test_capture_dependencies_no_auto_detect(
      self, mock_path, mock_file, mock_subprocess
  ):
      mock_open_custom_file = mock_open(
          read_data=CUSTOM_REQUIREMENT_FILE
      )
      mock_open_write = mock_open(read_data="")
      handlers = (
          mock_open_custom_file.return_value,
          mock_open_write.return_value,
      )
      mock_file.side_effect = handlers
  
      mock_path.is_file.return_value = True
  
      capture_dependencies(
          dependencies=NO_AUTO_DEPENDENCY_CONFIG,
          work_dir=WORK_DIR,
          capture_all=False,
      )
      mock_subprocess.run().assert_not_called()
      mocked_writes = mock_open_write.return_value.__enter__().write
  
      assert 4 == mocked_writes.call_count
  
      expected_calls = [
          call("boto3=1.28.*\n"),
          call("custom_module==1.2.3\n"),
          call("other_module@http://some/website.whl\n"),
      ]
      mocked_writes.assert_has_calls(expected_calls)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/serve/detector/test_dependency_manager.py
imports: from __future__ import absolute_import
  import unittest
  from unittest.mock import patch, mock_open, call
  from pathlib import Path
  from sagemaker.serve.detector.dependency_manager import _parse_dependency_list, capture_dependencies
label_desc: Use image node_id 2 for calling the DepedencyManagerTest obj's underlying member method code with example usage: obj.test_capture_dependencies_no_auto_detect(mock_path, mock_file, mock_subprocess) without return types