code: def assert_called_once_workaround(mock):
      """Asserts that a mock has been called exactly once.
  
      See assert_not_called_workaround for the backstory on why this function
      exists.
  
      Args:
        mock: The mock that should have been called exactly once.
  
      Raises:
        AssertionError: mock wasn't called exactly once.
      """
      if mock.call_count != 1:
          raise AssertionError(
              "Expected exactly one call to '{}' but was called {} times".format(
                  mock.name, mock.call_count
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import flags
  from absl.testing import absltest
  from etils import epath
  import six
  from third_party.nucleus.protos import position_pb2
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.protos import struct_pb2
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import cigar
label_desc: Use image node_id 11 for calling a global function with example usage: assert_called_once_workaround(mock) without return types