def verify_deprecated_policy(old_policy, new_policy, default_rule, context):
if _ENFORCER:<EOL><INDENT>current_rule = str(_ENFORCER.rules[old_policy])<EOL><DEDENT>else:<EOL><INDENT>current_rule = None<EOL><DEDENT>if current_rule != default_rule:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(new_policy,<EOL>old_policy))<EOL>target = {'<STR_LIT>': context.project_id,<EOL>'<STR_LIT>': context.user_id}<EOL>return authorize(context=context, action=old_policy, target=target)<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
Check the rule of the deprecated policy action

    If the current rule of the deprecated policy action is set to a non-default
    value, then a warning message is logged stating that the new policy
    action should be used to dictate permissions as the old policy action is
    being deprecated.

    :param old_policy: policy action that is being deprecated
    :param new_policy: policy action that is replacing old_policy
    :param default_rule: the old_policy action default rule value
    :param context: the monasca context