Return whether the transition 'unassign' can be performed or not
174718
def guard_unassign(duplicate_analysis):
    
    analysis = duplicate_analysis.getAnalysis()
    if wf.isTransitionAllowed(analysis, "unassign"):
        return True
    skip = ["retracted", "rejected", "unassigned"]
    if api.get_review_status(analysis) in skip:
        return True
    return analysis_guards.guard_unassign(duplicate_analysis)
1068973
def untrigger(queue, trigger=_c.FSQ_TRIGGER):
    ''''''
    trigger_path = fsq_path.trigger(queue, trigger=trigger)
    _queue_ok(os.path.dirname(trigger_path))
    try:
        os.unlink(trigger_path)
    except (OSError, IOError, ), e:
        if e.errno != errno.ENOENT:
            raise FSQConfigError(e.errno, wrap_io_os_err(e))
932294
function() {
        if (!this.transitions) return

        var leaveState, event, transitions = this.transitions
        for (leaveState in transitions)
          for (event in transitions[leaveState])
            this.transition(leaveState, event, transitions[leaveState][event])

        if (!(transitions.hasOwnProperty(INIT_STATE)
          || transitions.hasOwnProperty(ANY_STATE)) && typeof console !== 'undefined')
          console.warn('there is no transition from state "init" to another state.')
      }
979031
def unweave(target, *advices):
        """"""

        advices = (
            advice if isinstance(advice, Advice) else Advice(advice)
            for advice in advices
        )

        unweave(target=target, *advices)
827997
function UnassignedAssignment(requisition, arg) {
  this.param = new canon.Parameter({
    name: '__unassigned',
    description: l10n.lookup('cliOptions'),
    type: {
      name: 'param',
      requisition: requisition,
      isIncompleteName: (arg.text.charAt(0) === '-')
    }
  });
  this.paramIndex = -1;
  this.onAssignmentChange = util.createEvent('UnassignedAssignment.onAssignmentChange');

  // synchronize is ok because we can be sure that param type is synchronous
  this.conversion = util.synchronize(this.param.type.parse(arg, requisition)); //Orion-20140210
  this.conversion.assign(this);
}
852639
public function isUnsigned()
    {
        $flags = $this->parameters->get('flags');
        if (is_array($flags)) {
            return array_key_exists('UNSIGNED', array_flip($flags));
        }
        return false;
    }
1215967
def validate_valid_transition(enum, from_value, to_value):
    
    validate_available_choice(enum, to_value)
    if hasattr(enum, '_transitions') and not enum.is_valid_transition(from_value, to_value):
        message = _(six.text_type('{enum} can not go from "{from_value}" to "{to_value}"'))
        raise InvalidStatusOperationError(message.format(
            enum=enum.__name__,
            from_value=enum.name(from_value),
            to_value=enum.name(to_value) or to_value
        ))
406308
function isValidTransition (link, context) {
    var isValid = true;

    if (!(PromisePipe.envTransitions[context._env] && PromisePipe.envTransitions[context._env][link._env])) {
      if (!isSystemTransition(link._env)) {
        isValid = false;
      }
    }
    return isValid;
  }
944542
def transition(self, duration, brightness=None, temperature=None):
        
        # Transition immediately if duration is zero.
        if duration == 0:
            if brightness is not None:
                self.brightness = brightness
            if temperature is not None:
                self.temperature = temperature
            return
        if brightness != self.brightness or temperature != self.temperature:
            self._transition(duration, brightness, temperature)
384763
public boolean transit(T transition){
		S currentState = definition.getState(currentStateId.get());
		if (currentState != null){
			try{
				Transition<S> transitionDef = definition.getTransition(currentState, transition);
				return currentStateId.compareAndSet(transitionDef.fromStateId, transitionDef.toStateId);
			}catch(IllegalArgumentException iae){
				return false;
			}catch(NullPointerException npe){
				return false;
			}
		}
		return false;
	}
1056670
def can(self, event):
        
        return [t.new_state for t in self._transitions if t.event.equals(event)]
1072050
def select_transition(name, from_state, *conditions)
      if choice_transition?(name, from_state)
        match_transition_with(name, from_state, *conditions)
      else
        match_transition(name, from_state)
      end
    end
689940
def unassign_floating_ip(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        log.error(
            'The inassign_floating_ip function must be called with -f or --function.'
        )
        return False

    if not kwargs:
        kwargs = {}

    if 'floating_ip' not in kwargs:
        log.error('A floating IP is required.')
        return False

    result = query(method='floating_ips',
                   command=kwargs['floating_ip'] + '/actions',
                   args={'type': 'unassign'},
                   http_method='post')

    return result
1369671
private static boolean hasTransformableExifOrientation(
      CloseableStaticBitmap closeableStaticBitmap) {
    return closeableStaticBitmap.getExifOrientation() != ExifInterface.ORIENTATION_NORMAL
        && closeableStaticBitmap.getExifOrientation() != ExifInterface.ORIENTATION_UNDEFINED;
  }
346491
private boolean areNextStatesAvailable(Automaton source) {
        ArrayList<Transition> r = possibleTransitions.get(source);
        if (r != null) {
            for (Transition t : r) {
                if (t.evaluate()) {
                    return true;
                }
            }
        }
        return false;
    }
1142493
def can_unconsign(self):
        
        chain = BlockchainSpider.chain(self._tree, self.edition_number)
        if len(chain) == 0:
            self.reason = 'Master edition not yet registered'
            return False

        chain = BlockchainSpider.strip_loan(chain)
        action = chain[-1]['action']
        piece_address = chain[-1]['piece_address']
        edition_number = chain[-1]['edition_number']
        to_address = chain[-1]['to_address']

        if action != 'CONSIGN' or piece_address != self.piece_address or edition_number != self.edition_number or to_address != self.address:
            self.reason = 'Edition number {} is not consigned to {}'.format(self.edition_number, self.address)
            return False

        return True
395274
def can_transition(self, status_from: str, status_to: str) -> bool:
        
        if not self.STATUSES.can_transition(status_from=status_from, status_to=status_to):
            _logger.info(
                '`%s` tried to transition from status `%s` to non permitted status `%s`',
                str(self), status_from, status_to)
            return False

        return True