See docs for `DistributionModel` abstract base class.
352592
def dM(self, k, t, param, Mkt, tips=None, gaps=None):
        """"""
        assert 0 <= k < self.ncats
        assert ((param in self.freeparams) or (param == 't') or (
                param == self.distributedparam))
        assert param not in self.distributionparams
        return self._models[k].dM(t, param, Mkt, tips=tips, gaps=gaps)
1359114
private void generateLogicalView(PackageDoc[] pkgs) throws IOException {
        for (int i=0; i < pkgs.length; i++) {
            // generate statistics
            generateLogicalView(pkgs[i].ordinaryClasses(), pkgs[i].name());
        }
    }
906923
def plugin_for(cls, model):
        '''
        
        '''
        logger.debug("Getting a plugin for: %s", model)
        if not issubclass(model, Model):
            return
        if model in cls.plugins:
            return cls.plugins[model]
        for b in model.__bases__:
            p = cls.plugin_for(b)
            if p:
                return p
559693
def _sio_modules(cls, parent_commit):
        """"""
        sio = BytesIO(parent_commit.tree[cls.k_modules_file].data_stream.read())
        sio.name = cls.k_modules_file
        return sio
107474
def make_factory(klass, **kwargs):
    """"""
    factory_name = '%sFactory' % klass.__name__

    class Meta:
        model = klass

    kwargs['Meta'] = Meta
    base_class = kwargs.pop('FACTORY_CLASS', base.Factory)

    factory_class = type(base.Factory).__new__(type(base.Factory), factory_name, (base_class,), kwargs)
    factory_class.__name__ = '%sFactory' % klass.__name__
    factory_class.__doc__ = 'Auto-generated factory for class %s' % klass
    return factory_class
271711
def as_models(self, klass):
        """"""
        try:
            return [klass(mod) for mod in self.tree.reply.data.results.array[0].item]
        except AttributeError:
            return []
791560
public Object[] getAsModel(Map<Class<?>, List<Object>> o, Class<? extends D6Model> modelClazz) {

    return toArray(o.get(modelClazz), modelClazz);
  }
776985
def _inherit_from(context, uri, calling_uri):
    """"""

    if uri is None:
        return None
    template = _lookup_template(context, uri, calling_uri)
    self_ns = context['self']
    ih = self_ns
    while ih.inherits is not None:
        ih = ih.inherits
    lclcontext = context._locals({'next': ih})
    ih.inherits = TemplateNamespace("self:%s" % template.uri,
                                lclcontext,
                                template=template,
                                populate_self=False)
    context._data['parent'] = lclcontext._data['local'] = ih.inherits
    callable_ = getattr(template.module, '_mako_inherit', None)
    if callable_ is not None:
        ret = callable_(template, lclcontext)
        if ret:
            return ret

    gen_ns = getattr(template.module, '_mako_generate_namespaces', None)
    if gen_ns is not None:
        gen_ns(context)
    return (template.callable_, lclcontext)
1208080
def _paramlist_PartialLikelihoods(self):
        """"""
        if self._distributionmodel:
            return [param for param in self.model.freeparams +
                    [self.model.distributedparam] if param not in
                    self.model.distributionparams]
        else:
            return self.model.freeparams
208041
def modelresource_factory(model, resource_class=ModelResource):
    
    attrs = {'model': model}
    Meta = type(str('Meta'), (object,), attrs)

    class_name = model.__name__ + str('Resource')

    class_attrs = {
        'Meta': Meta,
    }

    metaclass = ModelDeclarativeMetaclass
    return metaclass(class_name, (resource_class,), class_attrs)
591964
def find_distributions(path_item, only=False):
    """"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)
1238077
def find_model(self, constructor, constraints=None, *, columns=None, table_name=None,
                 order_by=None):
    """"""
    return self._find_model(constructor, table_name or constructor.table_name, constraints,
                            columns=columns, order_by=order_by)
706272
def gen_orm_classes_from_base(base: Type) -> Generator[Type, None, None]:
    
    for cls in gen_all_subclasses(base):
        if _get_immediate_cls_attr(cls, '__abstract__', strict=True):
            # This is SQLAlchemy's own way of detecting abstract classes; see
            # sqlalchemy.ext.declarative.base
            continue  # NOT an ORM class
        yield cls
781614
def get_content_models(cls):
        
        concrete_model = base_concrete_model(ContentTyped, cls)
        return [m for m in apps.get_models()
                if m is not concrete_model and issubclass(m, concrete_model)]
1170356
def abstract(cls, predstr):
        """"""
        lemma, pos, sense, _ = split_pred_string(predstr)
        return cls(Pred.ABSTRACT, lemma, pos, sense, predstr)
1202069
def find_implementations(interface, recurse, abstract, result):
    """"""
    for item in MetaComponent.implementations:
        if (item['interface'] == interface and (abstract or not item['abstract'])):
            extend_unique(result, [item['class']])

    if recurse:
        subinterfaces = interface.__subclasses__()
        if subinterfaces:
            for i in subinterfaces:
                find_implementations(i, recurse, abstract, result)
603817
def work_model_factory(*, validator=validators.is_work_model, **kwargs):
    
    kwargs['ld_type'] = 'AbstractWork'
    return _model_factory(validator=validator, **kwargs)