<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_directive_values( directive_def: GraphQLDirective, node: NodeWithDirective, variable_values: Dict[str, Any] = None, ) -> Optional[Dict[str, Any]]: """Get coerced argument values based on provided nodes. Prepares a dict of argument values given a directive definition and an AST node which may contain directives. Optionally also accepts a dict of variable values. If the directive does not exist on the node, returns None. """

    directives = node.directives
    if directives:
        directive_name = directive_def.name
        for directive in directives:
            if directive.name.value == directive_name:
                return get_argument_values(directive_def, directive, variable_values)
    return None