code: def test_memoized(self):
      class Container:
          def _get(self, key):
              pass
  
          @utils.memoized
          def get(self, key):
              return self._get(key)
  
      container = Container()
  
      with unittest.mock.patch.object(
          container, "_get", side_effect=lambda x: x
      ) as get_mock:
          self.assertEqual("foo", container.get("foo"))
          get_mock.assert_called_once_with("foo")
  
          get_mock.reset_mock()
          self.assertEqual("foo", container.get("foo"))
          get_mock.assert_not_called()
  
          self.assertEqual("bar", container.get("bar"))
          get_mock.assert_called_once_with("bar")
  
          get_mock.reset_mock()
          container.get.cache.clear()
          self.assertEqual("bar", container.get("bar"))
          get_mock.assert_called_once_with("bar")
  
imports: import locale
  import logging
  import os
  import shutil
  from datetime import timezone
  from sys import platform
  from tempfile import mkdtemp
  from pelican import utils
  from pelican.generators import TemplatePagesGenerator
  from pelican.settings import read_settings
  from pelican.tests.support import LoggedTestCase, get_article, locale_available, unittest
  from pelican.writers import Writer
label_desc: Use image node_id 1 for calling the TestMemoized obj's underlying member method code with example usage: obj.test_memoized() and returns: self