def validate_all_keys_in_obj(obj_name, obj, validation_fun):
    """Validate all (nested) keys in `obj` by using `validation_fun`.

        Args:
            obj_name (str): name for `obj` being validated.
            obj (dict): dictionary object.
            validation_fun (function): function used to validate the value
            of `key`.

        Returns:
            None: indicates validation successful

        Raises:
            ValidationError: `validation_fun` will raise this error on failure
    """
    for key, value in obj.items():
        validation_fun(obj_name, key)
        if isinstance(value, dict):
            validate_all_keys_in_obj(obj_name, value, validation_fun)
        elif isinstance(value, list):
            validate_all_items_in_list(obj_name, value, validation_fun)
Validate all (nested) keys in `obj` by using `validation_fun`.

Args:
obj_name (str): name for `obj` being validated.
obj (dict): dictionary object.
validation_fun (function): function used to validate the value
of `key`.

Returns:
None: indicates validation successful

Raises:
ValidationError: `validation_fun` will raise this error on failure
bigchaindb/common/utils.py