def get_empty_instance(table):
    """ Return  empty instance of model.
    """
    instance_defaults_params = inspect.getargspec(table.__init__).args[1:]
    # list like ['name', 'group', 'visible'] to dict with empty
    # value as {'name': None, 'group': None, 'visible': None}
    init = dict(
        list(zip(instance_defaults_params, itertools.repeat(None)))
    )
    return table(**init)
def get_empty_instance ( table ) : instance_defaults_params = inspect . getargspec ( table . __init__ ) . args [ 1 : ] init = dict ( list ( zip ( instance_defaults_params , itertools . repeat ( None ) ) ) ) return table ( ** init )
Return  empty instance of model.