code: def test_merge_translations(self, custom_dir, theme_dir):
      custom_dir_translations = mock.Mock()
      theme_dir_translations = mock.Mock()
  
      def side_effet(*args, **kwargs):
          dirname = args[0]
          if dirname.startswith(custom_dir):
              return custom_dir_translations
          elif dirname.startswith(theme_dir):
              return theme_dir_translations
          else:
              self.fail()
  
      with mock.patch(
          "mkdocs.localization.Translations.load",
          side_effect=side_effet,
      ):
          install_translations(
              self.env, parse_locale("en"), [custom_dir, theme_dir]
          )
  
      theme_dir_translations.merge.assert_called_once_with(
          custom_dir_translations
      )
  
file_path: mkdocs/mkdocs/tests/localization_tests.py
imports: import unittest
  from unittest import mock
  from mkdocs.config.base import ValidationError
  from mkdocs.localization import install_translations, parse_locale
  from mkdocs.tests.base import tempdir
label_desc: Use image node_id 9 for calling the LocalizationTests obj's underlying member method code with example usage: obj.test_merge_translations(custom_dir, theme_dir) and returns: custom_dir_translations, theme_dir_translations