code: def generate_thrift(ordered_schemas):
      yield "#-------------------------------------------------------------------------------"
      yield "# Thrift bindings for H2O Machine Learning."
      yield "#"
      yield "# This file is auto-generated by h2o-3/h2o-bindings/bin/gen_thrift.py"
      yield "# Copyright 2016 H2O.ai;  Apache License Version 2.0 (see LICENSE for details)"
      yield "#-------------------------------------------------------------------------------"
      yield ""
      yield "namespace * water.bindings.structs"
      yield ""
      yield "union PrimitiveUnion {"
      yield "  1: bool bool_field"
      yield "  2: byte byte_field"
      yield "  3: i16 i16_field"
      yield "  4: i32 i32_field"
      yield "  5: i64 i64_field"
      yield "  6: double double_field"
      yield "  7: binary binary_field"
      yield "  8: string string_field"
      yield "}"
      yield ""
      for name, v in ordered_schemas.items():
          generator = (
              generate_enum if type(v) is list else generate_struct
          )
          for line in generator(name, v):
              yield line
  
file_path: h2o-3/h2o-bindings/bin/gen_thrift.py
imports: from collections import OrderedDict
  import bindings
label_desc: Use image node_id 3 for calling a global function with example usage: generate_thrift(ordered_schemas) without return types