docstr: Mock uuid._generate_time_safe() to return a given *safe_value*.
docstr_tok: ["Mock","uuid._generate_time_safe","(",")","to","return","a","given","*","safe_value","*","."]
code: def mock_generate_time_safe(self, safe_value):
      """
      Mock uuid._generate_time_safe() to return a given *safe_value*.
      """
      if os.name != "posix":
          self.skipTest("POSIX-only test")
      self.uuid._load_system_functions()
      f = self.uuid._generate_time_safe
      if f is None:
          self.skipTest("need uuid._generate_time_safe")
      with mock.patch.object(
          self.uuid, "_generate_time_safe", lambda: (f()[0], safe_value)
      ):
          yield
  
imports: import unittest
  from test import support
  from test.support import import_helper
  import builtins
  import contextlib
  import copy
  import enum
  import io
  import os
  import pickle
  import sys
  import weakref
  from unittest import mock
label_desc: Use image node_id 10 for calling the BaseTestUUID obj's underlying member method code with example usage: obj.mock_generate_time_safe(safe_value) without return types