Collect "extra == ..." operands from a marker.

    Returns a list of str. Each str is a speficied extra in this marker.
979489
def get_contained_extras(marker):
    
    if not marker:
        return set()
    extras = set()
    marker = _ensure_marker(marker)
    _markers_collect_extras(marker._markers, extras)
    return extras
51103
def extra_value(index, convert = false)
      return nil if index < 1 || index > 5
      val = send "extra_#{index}_value"
      if convert
        case extra_type(index)
          when 'boolean'
            BarkestCore::BooleanParser.parse_for_boolean_column(val)
          when 'integer'
            BarkestCore::NumberParser.parse_for_int_column(val)
          when 'float'
            BarkestCore::NumberParser.parse_for_float_column(val)
          else
            val.to_s
        end
      end
    end
1280588
def eval_to_ast(self, e, n, extra_constraints=(), exact=None):
        
        return [ ast.bv.BVV(v, e.size()) for v in self.eval(e, n, extra_constraints=extra_constraints, exact=exact) ]
560948
def _todict(expr, item_delim=',', kv_delim='='):
    
    return _string_op(expr, StringToDict, _item_delim=item_delim, _kv_delim=kv_delim,
                      output_type=types.Dict(types.string, types.string))
955736
def __check_for_extra_arguments(self, args_required, args_allowed):
        
        assert not self.active()
        if not self.__extra_parameter_errors:
            return

        if self.__kwargs:
            param_name = self.__kwargs.keys()[0]
            if param_name in self.__params_with_arguments:
                msg = "got multiple values for parameter '%s'"
            else:
                msg = "got an unexpected keyword argument '%s'"
            self.__error(msg % (param_name,))

        if self.__args:
            def plural_suffix(count):
                if count == 1:
                    return ""
                return "s"
            def plural_was_were(count):
                if count == 1:
                    return "was"
                return "were"
            expected = args_required
            if args_required != args_allowed:
                expected = "%d to %d" % (args_required, args_allowed)
            given = self.__args_count
            msg_parts = ["takes %s positional argument" % (expected,),
                plural_suffix(expected), " but %d " % (given,),
                plural_was_were(given), " given"]
            self.__error("".join(msg_parts))
292357
def find_shadowed(self, extra=()):
        
        i = self.identifiers
        return (i.declared | i.outer_undeclared) & \
               (i.declared_locally | i.declared_parameter) | \
               set(x for x in extra if i.is_declared(x))
339518
def listTheExtras(self, deleteAlso):
        
        # get list of extras
        extras = configobj.get_extra_values(self)
        # extras is in format: [(sections, key), (sections, key), ]
        # but we need: [(sections, key, result), ...] - set all results to
        # a bool just to make it the right shape.  BUT, since we are in
        # here anyway, make that bool mean something - hide info in it about
        # whether that extra item is a section (1) or just a single par (0)
        #
        # simplified, this is:  expanded = [ (x+(abool,)) for x in extras]
        expanded = [ (x+ \
                       ( bool(len(x[0])<1 and hasattr(self[x[1]], 'keys')), ) \
                     ) for x in extras]
        retval = ''
        if expanded:
            retval = flattened2str(expanded, extra=1)
        # but before we return, delete them (from ourself!) if requested to
        if deleteAlso:
            for tup_to_del in extras:
                target = self
                # descend the tree to the dict where this items is located.
                # (this works because target is not a copy (because the dict
                #  type is mutable))
                location = tup_to_del[0]
                for subdict in location: target = target[subdict]
                # delete it
                target.pop(tup_to_del[1])

        return retval
459484
def get_extra_data(self, data):
        """"""
        result = {}
        for key in data.keys():
            if key.startswith(self.name + '-'):
                new_key = key.replace(self.name + '-', '')
                result[new_key] = data[key]
        return result
1182659
def read_extra_lines(self, filename):
        
        data = np.atleast_2d(np.loadtxt(filename))
        for nr, coords in enumerate(data):
            p1 = [coords[0], coords[1]]
            p2 = [coords[2], coords[3]]
            index = self.add_line(p1, p2, self.char_lengths['extra_line'])
            self.ExtraLineIndices.append(index)
390966
def get_additional_occurrences(self, start, end):
        
        return [occ for _, occ in list(self.lookup.items()) if (occ.start < end and occ.end >= start and not occ.cancelled)]
885135
private Set<String> getNotNullExtraKeys(Node actual, Set<String> extraKeys) {
        Set<String> notNullExtraKeys = new TreeSet<>();
        for (String extraKey : extraKeys) {
            if (!actual.get(extraKey).isNull()) {
                notNullExtraKeys.add(extraKey);
            }
        }
        return notNullExtraKeys;
    }
1173762
def get_extra_ds(dataset):
    """"""
    ds_collection = {}
    for ds in dataset.attrs.get('ancillary_variables', []):
        ds_collection.update(get_extra_ds(ds))
    ds_collection[dataset.attrs['name']] = dataset

    return ds_collection
13601
def rx_int_extra(rxmatch):
    

    rxmatch = re.search("\d+", rxmatch.group(0))
    return int(rxmatch.group(0))
85997
def findall(self, expr):
        
        result = []
        try:
            for arg in expr.args:
                result.extend(self.findall(arg))
            for arg in expr.kwargs.values():
                result.extend(self.findall(arg))
        except AttributeError:
            pass
        if self.match(expr):
            result.append(expr)
        return result
129969
def pull_int_tail(self, string: str) -> str:
        '''  '''
        int_tail = ''
        for element in string[::-1]:
            try:
                int(element)
                int_tail = element + int_tail
            except:
                pass
        return int_tail
360909
def extras_msg(extras):
    

    if len(extras) == 1:
        verb = "was"
    else:
        verb = "were"
    return ", ".join(repr(extra) for extra in extras), verb
322865
def get_marker(self, increment=1):
        

        i = self.markers_index

        self.markers_index += increment
        if self.markers_index >= len(self.markers):
            self.markers_index = self.markers_index-len(self.markers)
            if self.markers_index >= len(self.markers): self.markers_index=0 # to be safe

        return self.markers[i]