def checkwritable(val, depth=0):
    
    if val is None:
        return
    if isinstance(val, (bool, int, float, str, bytes, ObjectId, datetime.datetime)):
        return
    if depth >= 8:
        raise TypeError('Database object cannot be recursive')
    if isinstance(val, (list, tuple)):
        for subval in val:
            checkwritable(subval, depth=depth+1)
        return
    if isinstance(val, dict):
        for (key, subval) in val.items():
            if not isinstance(key, str):
                raise TypeError('Database dicts must have string keys: %s' % (key,))
            if '.' in key:
                raise TypeError('Database dict keys must not contain period: %s' % (key,))
            if key.startswith('$'):
                raise TypeError('Database dict keys must not start with dollar: %s' % (key,))
            checkwritable(subval, depth=depth+1)
        return
    raise TypeError('Not a database type: %s' % (val,))
Private fit method of the Estimator, which trains the model.
dataset/ETHPy150Open erkyrath/tworld/lib/two/propcache.py/checkwritable--crossover with--dataset/ETHPy150Open maxpumperla/elephas/elephas/ml_model.py/ElephasEstimator._fit