code: def set_time_function(self, function):
          
          if isinstance(function, types.FunctionType):
              self.get_time = function
          else:
              raise ValueError("Invalid value for DUT time function")
docs: Set time function to be used.
  
          :param function: callable function
          :return: Nothing
          :raises: ValueError if function is not types.FunctionType.