Returns the label for the given loop type which
        continues the loop. loop_type must be one of 'FOR', 'WHILE', 'DO'
514989
def loop_cont_label(self, loop_type):
        
        for i in range(len(self.LOOPS) - 1, -1, -1):
            if loop_type == self.LOOPS[i][0]:
                return self.LOOPS[i][2]

        raise InvalidLoopError(loop_type)
353043
def _get_x_label(self, i):
        """"""
        if not self.x_labels or not self._y_labels or len(self._y_labels) <= i:
            return
        return self._y_labels[i][0]
1042309
def label(self) -> str:
        """"""
        label = self.expression.replace("_", "\\;")
        if self.units_kind:
            symbol = wt_units.get_symbol(self.units)
            for v in self.variables:
                vl = "%s_{%s}" % (symbol, v.label)
                vl = vl.replace("_{}", "")  # label can be empty, no empty subscripts
                label = label.replace(v.natural_name, vl)
                val = (
                    round(self.value, self.round_spec)
                    if self.round_spec is not None
                    else self.value
                )
        label += r"\,=\,{}".format(format(val, self.format_spec))
        if self.units_kind:
            units_dictionary = getattr(wt_units, self.units_kind)
            label += r"\,"
            label += units_dictionary[self.units][2]
        label = r"$\mathsf{%s}$" % label
        return label
112676
def get_line_value(self, context_type):
        
        if context_type.upper() == "ENV":
            return self.line_envs
        elif context_type.upper() == "LABEL":
            return self.line_labels
1027878
def contains_if(self, include_loop=True):
        
        if include_loop:
            return self.type in [NodeType.IF, NodeType.IFLOOP]
        return self.type == NodeType.IF
1102817
def check_pending_labels(ast):
    
    result = True
    visited = set()
    pending = [ast]

    while pending:
        node = pending.pop()

        if node is None or node in visited:  # Avoid recursive infinite-loop
            continue

        visited.add(node)
        for x in node.children:
            pending.append(x)

        if node.token != 'VAR' or (node.token == 'VAR' and node.class_ is not CLASS.unknown):
            continue

        tmp = global_.SYMBOL_TABLE.get_entry(node.name)
        if tmp is None or tmp.class_ is CLASS.unknown:
            syntax_error(node.lineno, 'Undeclared identifier "%s"'
                         % node.name)
        else:
            assert tmp.class_ == CLASS.label
            node.to_label(node)

        result = result and tmp is not None

    return result
249350
def label(self):
        
        value = self._element_dict.get("value")
        type_name = type(value).__name__

        if type_name == "NoneType":
            return ""

        if type_name == "list":
            # ---like '10-15' or 'A-F'---
            return "-".join([str(item) for item in value])

        if type_name in ("float", "int"):
            return str(value)

        if type_name in ("str", "unicode"):
            return value

        # ---For CA and MR subvar dimensions---
        name = value.get("references", {}).get("name")
        return name if name else ""
572176
def getTypeLastNode(self, type_):
        

        lastNode = ""
        if type_ and (type(type_) is not list) and (type(type_) is not dict):
            aType = type_.split('>')
            lastNode = aType[len(aType) - 1]
        return lastNode
1211459
def get_reference(self, rtype: str, label: str):
        

        # We are doing this instead of dictionary access in case we change
        # the storage later to a multidict thingy for optimization.

        reftype = self.data.get(rtype)
        if reftype:
            # The reftype might be "python" or "sphinx" or something else
            # from an Intersphinx registry, not something internal to
            # Kaybee.
            return reftype[label]
723761
def names_labels(self, do_print=False):
        
        if do_print:
            for name, label in zip(self.field_names, self.field_labels):
                print('%s --> %s' % (str(name), str(label)))
        return self.field_names, self.field_labels
245079
def type_string(self):
        '''
        
        '''
        type = self.get_info()['type']
        type_list = []
        for member in dir(self):
            if member.startswith("PERF_"):
                bit = getattr(self, member)
                if bit and bit & type:
                    type_list.append(member[5:])
        return type_list
355753
def label(self, name, internal=False, definition=False):
        
        return "{0}{1}{2}".format(self.internal if internal else "", name, self.definition if definition else "")
285380
def get_label(self, label, params=None):
        
        return self.label(label, action='GET', params=params)
927814
def label(self) -> str:
        """"""
        label = self.expression.replace("_", "\\;")
        if self.units_kind:
            symbol = wt_units.get_symbol(self.units)
            for v in self.variables:
                vl = "%s_{%s}" % (symbol, v.label)
                vl = vl.replace("_{}", "")  # label can be empty, no empty subscripts
                label = label.replace(v.natural_name, vl)
            units_dictionary = getattr(wt_units, self.units_kind)
            label += r"\,"
            label += r"\left("
            label += units_dictionary[self.units][2]
            label += r"\right)"
        label = r"$\mathsf{%s}$" % label
        return label
401010
def get_label(key):
    
    if key in rel:
        if mpl.rcParams['text.usetex']:
            return rel[key]['label_latex']
        else:
            return rel[key]['label_mpl']
    else:
        return key
1158787
def find_label(self, label: Label):
        
        for index, action in enumerate(self.program):
            if isinstance(action, JumpTarget):
                if label == action.label:
                    return index

        raise RuntimeError("Improper program - Jump Target not found in the "
                           "input program!")
1037276
def labels(self):
        
        return [x for x in self[self.current_scope].values() if x.class_ == CLASS.label]