Private helper function.
162634
def calibrate_percentile_ranks(allele, predictor, peptides=None):
    
    global GLOBAL_DATA
    if peptides is None:
        peptides = GLOBAL_DATA["calibration_peptides"]
    predictor.calibrate_percentile_ranks(
        peptides=peptides,
        alleles=[allele])
    return {
        allele: predictor.allele_to_percent_rank_transform[allele],
    }
1094850
def rgetattr(obj, attr, *args):
  """"""
  def _getattr(obj, attr):
    return getattr(obj, attr, *args)
  return functools.reduce(_getattr, [obj] + attr.split("."))
153701
def converter(f):
    """"""
    @wraps(f)
    def wrapper(*args, **kwds):
        return convert(f(*args, **kwds))
    return wrapper
879940
def propertyContainer(self, ulBuffer):
        """"""

        fn = self.function_table.propertyContainer
        result = fn(ulBuffer)
        return result
753740
def _onFunction(self, name, line, pos, absPosition,
                    keywordLine, keywordPos,
                    colonLine, colonPos, level,
                    isAsync, returnAnnotation):
        """"""
        self.__flushLevel(level)
        f = Function(name, line, pos, absPosition, keywordLine, keywordPos,
                     colonLine, colonPos, isAsync, returnAnnotation)
        if self.__lastDecorators is not None:
            f.decorators = self.__lastDecorators
            self.__lastDecorators = None
        self.objectsStack.append(f)
373551
def fval(self, instance):
        """"""
        try:
            val = instance.__dict__[self.instance_field_name]
        except KeyError as e:
            #raise AttributeError(str(e))
            val = None

        return val
1250009
def __get_arg(cls, kwds, kwd):
    """"""
    alt_kwd = '_' + kwd
    if alt_kwd in kwds:
      return kwds.pop(alt_kwd)
    if kwd in kwds:
      obj = getattr(cls, kwd, None)
      if not isinstance(obj, Property) or isinstance(obj, ModelKey):
        return kwds.pop(kwd)
    return None
223859
function(filenames) {
				var isIn = _.some(filenames, function(line) {
					return file.path.indexOf(line) !== -1;
				});
				if (isIn) {
					self.push(file);
				}
				callback();
			}
1209781
def lpop(self, key, *, encoding=_NOTSET):
        """"""
        return self.execute(b'LPOP', key, encoding=encoding)
186159
def unpack(self, buff, offset=0):
        """"""
        super().unpack(buff, offset)
        code_class = ErrorType(self.error_type).get_class()
        self.code = code_class(self.code)
476468
def uor(self):
        """"""
        return reduce(operator.or_, self._items, self.ftype.box(0))
412941
def attrib(context=None, **kwargs):
    """"""
    kwargs.setdefault('metadata', {})
    kwargs['metadata'][KEY] = context
    return attr.ib(**kwargs)
1162502
function toDefault(val, def) {
    if (is_1.isValue(val) && !(is_1.isEmpty(val) && !is_1.isEmpty(def)))
        return val;
    return is_1.isValue(def) ? def : null;
}
886498
def nullify(function):
    ""
    def wrapper(*args, **kwargs):
        value = function(*args, **kwargs)
        if(type(value) == list and len(value) == 0):
            return None
        return value
    return wrapper
182082
def _getSuperFunc(self, s, func):
        """"""

        return getattr(super(self.cls(), s), func.__name__)
763191
def _call(self, x, out=None, **kwargs):
        """"""
        if out is None:
            return self._call_out_of_place(x, **kwargs)
        else:
            self._call_in_place(x, out=out, **kwargs)
1261777
def call_fdel(self, obj) -> None:
        """"""
        self.fdel(obj)
        try:
            del vars(obj)[self.name]
        except KeyError:
            pass