Mark this table as circular (or not).

        Args:
            circular: is it circular?
            chain: if it's circular, this should be the list of tables
                participating in the circular chain
970092
def set_circular(self, circular: bool, chain: List[Table] = None) -> None:
        
        self.circular = circular
        self.circular_chain = chain or []
500117
public synchronized void recordBreadcrumb(Breadcrumb breadcrumb) {
        if (breadcrumbs == null) {
            breadcrumbs = new CircularFifoQueue<>(breadcrumbLimit);
        }

        breadcrumbs.add(breadcrumb);
    }
46306
def _chain_forks(elements):
        """"""
        # we are only interested in the result, so unwind from the end
        for element in reversed(elements):
            if element.chain_fork:
                return True
            elif element.chain_join:
                return False
        return False
868648
private void checkCircularReference(final BeanId... references) {
        for (BeanId beanId : references) {
            if (getId().equals(beanId)) {
                throw CFG310_CIRCULAR_REF(getId(), getId());
            }
        }
    }
760484
def _is_child(self, parent, child):  # type: (str, str) -> bool
        
        parent_parts = tuple(self._split_table_name(parent))
        child_parts = tuple(self._split_table_name(child))

        if parent_parts == child_parts:
            return False

        return parent_parts == child_parts[: len(parent_parts)]
868378
private void throwCircularDependenciesException()
            throws CircularDependenciesException {
        String msg = "Circular dependencies found. Check the circular graph below:\n";
        boolean firstNode = true;
        String tab = "  ";
        for (String visit : visitedInjectNodes) {
            if (!firstNode) {
                msg += tab + "->";
                tab += tab;
            }
            msg += visit + "\n";
            firstNode = false;
        }
        msg += tab.substring(2) + "->" + revisitedNode + "\n";
        throw new CircularDependenciesException(msg);
    }
948858
def track_sequence(self, name, checkpoints, description='', max_rows=None):
        
        if name in self._tables:
            raise TableConflictError(name)
        if max_rows is None:
            max_rows = AnonymousUsageTracker.MAX_ROWS_PER_TABLE
        self.register_table(name, self.uuid, 'Sequence', description)
        self._tables[name] = Sequence(name, self, checkpoints, max_rows=max_rows)
720753
def is_cyclic(head):
    
    if not head:
        return False
    runner = head
    walker = head
    while runner.next and runner.next.next:
        runner = runner.next.next
        walker = walker.next
        if runner == walker:
            return True
    return False
123323
def _set_join(self, query=None):
        
        if not query:
            query = self._query

        foreign_key = '%s.%s' % (self._related.get_table(), self._second_key)

        query.join(self._parent.get_table(), self.get_qualified_parent_key_name(), '=', foreign_key)
1140070
def _check_no_current_table(new_obj, current_table):
    
    if current_table is None:
        msg = 'Cannot add {} before adding table'
        if isinstance(new_obj, Relation):
            raise NoCurrentTableException(msg.format('relation'))
        if isinstance(new_obj, Column):
            raise NoCurrentTableException(msg.format('column'))
643646
def parent_chain(self):
        
        chain = [self]
        while True:
            try:
                parent = chain[-1].parent
            except Exception:
                break
            if parent is None:
                break
            chain.append(parent)
        return chain
83736
def set_table_name
      [self.old_name, self.new_name].each do |name|
        # make sure this table exists
        if self.table_exists?(name)
          # return true if we are already using this table
          return true if self.klass.table_name == name.to_s
          # otherwise we can change the table name
          self.klass.table_name = name
          return true
        end
      end
      self.raise_no_table_error
    end
1220245
def chain_present(name, table='filter', table_type=None, hook=None, priority=None, family='ipv4'):
    '''
    
    '''

    ret = {'name': name,
           'changes': {},
           'result': None,
           'comment': ''}

    chain_check = __salt__['nftables.check_chain'](table, name, family=family)
    if chain_check['result'] is True:
        ret['result'] = True
        ret['comment'] = ('nftables {0} chain is already exist in {1} table for {2}'
                          .format(name, table, family))
        return ret

    res = __salt__['nftables.new_chain'](
            table,
            name,
            table_type=table_type,
            hook=hook,
            priority=priority,
            family=family
    )

    if res['result'] is True:
        ret['changes'] = {'locale': name}
        ret['result'] = True
        ret['comment'] = ('nftables {0} chain in {1} table create success for {2}'
                          .format(name, table, family))
        return ret
    else:
        ret['result'] = False
        ret['comment'] = 'Failed to create {0} chain in {1} table: {2} for {3}'.format(
            name,
            table,
            res['comment'].strip(),
            family
        )
        return ret
188155
def is_cyclic(graph):
    
    path = set()

    def visit(vertex):
        path.add(vertex)
        for neighbour in graph.get(vertex, ()):
            if neighbour in path or visit(neighbour):
                return True
        path.remove(vertex)
        return False

    return any(visit(v) for v in graph)
1274985
def get_chain(self, name, table="filter"):
        
        return [r for r in self.rules if r["table"] == table and r["chain"] == name]
227326
def other_Orange_tables(self):
        '''
            
        '''
        target_table = self.db.target_table
        if not self.db.orng_tables:
            return [self.convert_table(table, None) for table in self.db.tables if table != target_table]
        else:
            return [table for name, table in list(self.db.orng_tables.items()) if name != target_table]
987485
def has_rotational(self):
        """"""
        for member in self.get_members():
            if member.physical_drives.has_rotational:
                return True
        return False