code: def apply_operation(operation_def_cls, *args, **kwargs):
      """Applies an operation to some inputs and returns its output.
  
      This function is syntactic sugar on top of the constructor for OperationNode.
      The operation must return a single output.
  
      Args:
        operation_def_cls: A class that is a subclass of `OperationDef`.
        *args: The inputs to the `OperationNode`.
        **kwargs: Constructor args for `operation_def_cls`.
  
      Returns:
        The output of the `OperationNode` that was constructed.
      """
      (result,) = apply_multi_output_operation(
          operation_def_cls, *args, **kwargs
      )
      return result
  
imports: import abc
  import collections
  import dataclasses
  from typing import Any, Collection, Dict, List, Optional, Tuple
  import pydot
label_desc: Use image node_id 1 for calling a global function with example usage: apply_operation(operation_def_cls) and returns: result