method to calculate how much to give the "partial" indicator where a measure is a pickup
        :return: str which is the lilypond bar length
547069
def getPartialLength(self):
        
        indexes = self.GetChildrenIndexes()
        length = 0
        divider = 0
        total = 0
        result = ""
        for v in indexes:
            voice = self.GetChild(v)
            if voice.note_total > length:
                length = voice.note_total
                note_types = voice.GetAllNoteTypes()
                if len(note_types) == 1:
                    total = length
                    result = str(total)
                else:
                    note_types.sort()
                    total = note_types[0]
                    result = str(total)
                    previous = total
                    count = 0
                    for value in note_types[1:]:
                        if previous * 2 == value:
                            result += "."
                        if previous == value:
                            if total >= previous:
                                total -= previous
                            else:
                                total -= previous / 2
                            total += previous / 2
                            value = previous / 2
                        previous = value

                    first_digit = str(int(total))
                    result = first_digit + result[1:]

        return result
532029
def length(self):
        

        if not self.__length:
            self.__length = self.__get_length()

        return self.__length
1156517
def request_length(self):
        
        remainder = self.stop_at - self.offset
        return self.chunk_size if remainder > self.chunk_size else remainder
691529
def get_size_str(size):
    
    if size == 0:
        magnitude = 0
        level = 0
    else:
        magnitude = math.floor(math.log(size, 10))
        level = int(min(math.floor(magnitude // 3), 4))
    return ('%d' if level == 0 else '%.2f') % (float(size) / 2**(level*10)) + ' ' + SIZE_LEVEL[level]
642720
function getLength(queue, queuex) {
  // if previous call didn't execute all callbacks
  return queuex.length ?
    // reprioritize the queue putting those in front
    queue.unshift.apply(queue, queuex) :
    queue.length;
}
184203
function calculate(side, otherSide, type, adjustment, side1, side2, lengthName, targetLength, elemLength) {
		var initialPos = position[side1],
			mySide = my[side],
			atSide = at[side],
			isShift = type === SHIFT,
			myLength = mySide === side1 ? elemLength : mySide === side2 ? -elemLength : -elemLength / 2,
			atLength = atSide === side1 ? targetLength : atSide === side2 ? -targetLength : -targetLength / 2,
			sideOffset = viewportScroll[side1] + viewportOffset[side1] - (containerStatic ? 0 : containerOffset[side1]),
			overflow1 = sideOffset - initialPos,
			overflow2 = initialPos + elemLength - (lengthName === WIDTH ? viewportWidth : viewportHeight) - sideOffset,
			offset = myLength - (my.precedance === side || mySide === my[otherSide] ? atLength : 0) - (atSide === CENTER ? targetLength / 2 : 0);

		// shift
		if(isShift) {
			offset = (mySide === side1 ? 1 : -1) * myLength;

			// Adjust position but keep it within viewport dimensions
			position[side1] += overflow1 > 0 ? overflow1 : overflow2 > 0 ? -overflow2 : 0;
			position[side1] = Math.max(
				-containerOffset[side1] + viewportOffset[side1],
				initialPos - offset,
				Math.min(
					Math.max(
						-containerOffset[side1] + viewportOffset[side1] + (lengthName === WIDTH ? viewportWidth : viewportHeight),
						initialPos + offset
					),
					position[side1],

					// Make sure we don't adjust complete off the element when using 'center'
					mySide === 'center' ? initialPos - myLength : 1E9
				)
			);

		}

		// flip/flipinvert
		else {
			// Update adjustment amount depending on if using flipinvert or flip
			adjustment *= type === FLIPINVERT ? 2 : 0;

			// Check for overflow on the left/top
			if(overflow1 > 0 && (mySide !== side1 || overflow2 > 0)) {
				position[side1] -= offset + adjustment;
				newMy.invert(side, side1);
			}

			// Check for overflow on the bottom/right
			else if(overflow2 > 0 && (mySide !== side2 || overflow1 > 0)  ) {
				position[side1] -= (mySide === CENTER ? -offset : offset) + adjustment;
				newMy.invert(side, side2);
			}

			// Make sure we haven't made things worse with the adjustment and reset if so
			if(position[side1] < viewportScroll[side1] && -position[side1] > overflow2) {
				position[side1] = initialPos; newMy = my.clone();
			}
		}

		return position[side1] - initialPos;
	}
355929
def value(self, progress_indicator):
        
        return interpolate.interpolate_linear_single(self.initial_value, self.final_value, progress_indicator)
1254270
def getBottomLeft(self):
        
        return (float(self.get_cx()) - float(self.get_r()), float(self.get_cy()) - float(self.get_r()))
1172432
def p_lpartselect_lpointer_plus(self, p):
        ''
        p[0] = Partselect(p[1], p[3], Plus(p[3], p[5]), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
129890
def toLily(self):
        '''
        
        '''

        lilystring = ""

        if not self.autoBeam:
            lilystring += "\\autoBeamOff"
        children = self.SortedChildren()
        if not hasattr(self, "transpose"):
            self.transpose = None
        for child in range(len(children)):
            measureNode = self.GetChild(children[child])
            measureNode.autoBeam = self.autoBeam
            lilystring += " % measure " + str(children[child]) + "\n"
            lilystring += measureNode.toLily() + "\n\n"
        return lilystring
831312
function length(item) {
        if (!validateHelpers.isUndefined(item.length)) {
            return item.length;
        }

        if (validateHelpers.isObject(item)) {
            return Object.keys(item).length;
        }

        return 0;
    }
934875
def getTopLeft(self):
        
        return (float(self.get_cx()) - float(self.get_r()), float(self.get_cy()) + float(self.get_r()))
468689
def pad_position_l(self, i):
        
        if i >= self.n_pads_l:
            raise ModelError("pad index out-of-bounds")
        return (self.length - self.pad_length) / (self.n_pads_l - 1) * i + self.pad_length / 2
799513
def get_pdu_length(self):
        
        logger.info("getting PDU length")
        requested_ = c_uint16()
        negotiated_ = c_uint16()
        code = self.library.Cli_GetPduLength(self.pointer, byref(requested_), byref(negotiated_))
        check_error(code)

        return negotiated_.value
1216587
def get(self):
        
        try:
            self._measurementController.reloadCompletedMeasurements()
            return None, 200
        except:
            logger.exception("Failed to reload measurements")
            return str(sys.exc_info()), 500
124041
def value(self, progress_indicator):
        
        if progress_indicator <= self.end_of_interpolation:
            return interpolate.interpolate_linear_single(
                self.initial_value, self.final_value, progress_indicator/self.end_of_interpolation
            )
        else:
            return self.final_value
394561
def length(self, t0=0, t1=1, error=None, min_depth=None):
        """"""
        return abs(self.end - self.start)*(t1-t0)