code: def testDeprecationAliasFunction(self):
      # By default, we warn once across all calls.
      my_function_1 = self._mock_function(name="my_function_1")
      deprecation_alias_1 = deprecation_utils.deprecated_alias(
          "deprecation_alias_1", "my_function_1", my_function_1
      )
      deprecation_alias_1()
      deprecation_alias_1()
      self._assertDeprecatedWarningRegex(
          "From .*: The name deprecation_alias_1 is deprecated. Please use "
          "my_function_1 instead."
      )
      self.assertEqual(my_function_1.call_count, 2)
      self._mock_warn.reset_mock()
  
      # If `warn_once=False`, we warn once for each call.
      my_function_2 = self._mock_function()
      deprecation_alias_2 = deprecation_utils.deprecated_alias(
          "deprecation_alias_2",
          "my_function_2",
          my_function_2,
          warn_once=False,
      )
      deprecation_alias_2()
      deprecation_alias_2()
      deprecation_alias_2()
      self.assertEqual(self._mock_warn.call_count, 3)
      self.assertEqual(my_function_2.call_count, 3)
  
file_path: tfx/tfx/utils/deprecation_utils_test.py
imports: from unittest import mock
  import tensorflow
  from tfx.utils import deprecation_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 5 for calling the DependencyUtilsTest obj's underlying member method code with example usage: obj.testDeprecationAliasFunction() without return types