code: def leave_OperationDefinition(self, node, *args):
      name = node.name
      selection_set = node.selection_set
      op = node.operation
      var_defs = wrap("(", join(node.variable_definitions, ", "), ")")
      directives = join(node.directives, " ")
  
      if not name and not directives and not var_defs and op == "query":
          return selection_set
  
      return join(
          [op, join([name, var_defs]), directives, selection_set], " "
      )
  
imports: import json
  from .visitor import Visitor, visit
label_desc: Use image node_id 4 for calling the PrintingVisitor obj's underlying member method code with example usage: obj.leave_OperationDefinition(node) and returns: join, selection_set