Checks if the `pp_seq_no` could have been in view `view_no`. It will
        return False when the `pp_seq_no` belongs to a later view than
        `view_no` else will return True
        :return:
961458
def can_pp_seq_no_be_in_view(self, view_no, pp_seq_no):
        
        if view_no > self.viewNo:
            raise PlenumValueError(
                'view_no', view_no,
                "<= current view_no {}".format(self.viewNo),
                prefix=self
            )

        return view_no == self.viewNo or (
            view_no < self.viewNo and self.last_prepared_before_view_change and compare_3PC_keys(
                (view_no, pp_seq_no), self.last_prepared_before_view_change) >= 0)
650014
public function viewExists($view)
    {
        list($path, $view) = Modules::find($view, $this->_module, 'views/');
        return (bool) trim($path);
    }
1251838
def prj_view_seq(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        i = self.prj_seq_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            seq = item.internal_data()
            self.view_seq(seq)
401310
def use_any_status_sequence_rule_enabler_view(self):
        """"""
        self._operable_views['sequence_rule_enabler'] = ANY_STATUS
        # self._get_provider_session('sequence_rule_enabler_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_any_status_sequence_rule_enabler_view()
            except AttributeError:
                pass
1096273
def has_option(self, section, option):
        
        if section not in self.sections():
            return False
        else:
            option = self.optionxform(option)
            return option in self[section]
817775
private static boolean isSingleOu(List<CmsProject> projects) {

        String ouFqn = null;
        for (CmsProject project : projects) {
            if (project.isOnlineProject()) {
                // skip the online project
                continue;
            }
            if (ouFqn == null) {
                // set the first ou
                ouFqn = project.getOuFqn();
            } else if (!ouFqn.equals(project.getOuFqn())) {
                // break if one different ou is found
                return false;
            }
        }
        return true;
    }
814411
def is_catchup_needed_during_view_change(self) -> bool:
        
        if self.caught_up_for_current_view():
            logger.info('{} is caught up for the current view {}'.format(self, self.viewNo))
            return False
        logger.info('{} is not caught up for the current view {}'.format(self, self.viewNo))

        if self.num_txns_caught_up_in_last_catchup() == 0:
            if self.has_ordered_till_last_prepared_certificate():
                logger.info('{} ordered till last prepared certificate'.format(self))
                return False

        if self.is_catch_up_limit(self.config.MIN_TIMEOUT_CATCHUPS_DONE_DURING_VIEW_CHANGE):
            # No more 3PC messages will be processed since maximum catchup
            # rounds have been done
            self.master_replica.last_prepared_before_view_change = None
            return False

        return True
954676
def check_order(current, hit, overlap = 200):
    
    prev_model = current[-1][2:4]
    prev_strand = current[-1][-2]
    hit_model = hit[2:4]
    hit_strand = hit[-2]
    # make sure they are on the same strand
    if prev_strand != hit_strand:
        return False
    # check for sequential hits on + strand
    if prev_strand == '+' and (prev_model[1] - hit_model[0] >= overlap):
        return False
    # check for sequential hits on - strand
    if prev_strand == '-' and (hit_model[1] - prev_model[0] >= overlap):
        return False
    else:
        return True
190469
def _get_view_result(view, raw_result, **kwargs):
        
        if raw_result:
            return view(**kwargs)
        if kwargs:
            return Result(view, **kwargs)

        return view.result
255634
def view_change_started(self, viewNo: int):
        
        if viewNo <= self.viewNo:
            logger.warning("{}Provided view no {} is not greater"
                           " than the current view no {}"
                           .format(VIEW_CHANGE_PREFIX, viewNo, self.viewNo))
            return False
        self.previous_master_primary = self.node.master_primary_name
        for replica in self.replicas.values():
            replica.primaryName = None
        return True
1053034
def is_archive(self):
        

        ns_prefix = self.archive_namespace
        if ns_prefix:
            if ns_prefix + '_archive' in self.feed.feed:
                # This is declared to be an archive view
                return True
            if ns_prefix + '_current' in self.feed.feed:
                # This is declared to be the current view
                return False

        # Either we don't have the namespace, or the view wasn't declared.
        rels = collections.defaultdict(list)
        for link in self.feed.feed.links:
            rels[link.rel].append(link.href)

        return ('current' in rels and
                ('self' not in rels or
                 rels['self'] != rels['current']))
1366348
def is_seq(arg):
    '''
    
    '''
    return isinstance(arg, (list_type, tuple_type, pyr.PVector, pyr.PList)) or is_nparray(arg)
603926
def _view_filter(self):
        
        view_filter = OsidSession._view_filter(self)
        if self._sequestered_view == SEQUESTERED:
            view_filter['sequestered'] = False
        return view_filter
614012
def is_selected(self, model):
        
        if model is None:
            return len(self._selected) == 0
        return model in self._selected
1146431
def checkseq(sequence: str=None,  code="ATGC") -> bool:
    
    for base in sequence:
        if base not in code:
            return False
    return True
8061
def use_any_status_sequence_rule_view(self):
        """"""
        self._operable_views['sequence_rule'] = ANY_STATUS
        # self._get_provider_session('sequence_rule_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_any_status_sequence_rule_view()
            except AttributeError:
                pass
602019
def equal_to(self, seq_prop):
        
        if not self.seq or not seq_prop or not seq_prop.seq:
            return False

        return self.seq == seq_prop.seq