def _output_validates_with_args(
    kwargs_validators, obj, *args, **kwargs
):
    if isinstance(obj, list):
        for item in obj:
            _output_validates_with_args(
                kwargs_validators, item, *args, **kwargs
            )
        return
    if isinstance(obj, models.HelperMixin):
        obj = obj.to_dict()
    if not isinstance(obj, dict):
        raise exception.InvalidResponse(
            'response %s type is not dict' % str(obj)
        )
    try:
        for key, value in obj.items():
            if key in kwargs_validators:
                kwargs_validators[key](value, *args, **kwargs)
    except Exception as error:
        logging.exception(error)
        raise error
Add a new object to the cache.
dataset/ETHPy150Open openstack/compass-core/compass/db/api/utils.py/_output_validates_with_args--crossover with--dataset/ETHPy150Open kivy/kivy/kivy/cache.py/Cache.append