code: def validate_busy(func, *args, **kwargs):
      
      def inner(self, *args, **kwargs):
          # find the target param
          target_id = None
          if 'target_id' in kwargs and kwargs['target_id'] != None:
              target_id = kwargs['target_id']
          else:
              target_id = 0
  
          # if there was a target specified, ensure it's not busy
          if self.target_is_busy(target_id):
              raise TargetBusyException()
  
          # call the function
          return func(self, *args, **kwargs)
      return inner
docs: A decorator that raises an exception if the specified target is busy.
  
      Expects the target ID to be either the 'target_id' param in kwargs,
      or the first positional parameter.
  
      Raises a TargetBusyException if the target does not exist.