code: def legacy_get_enum(
      size_average: Optional[bool],
      reduce: Optional[bool],
      emit_warning: bool = True,
  ) -> int:
      return get_enum(
          legacy_get_string(size_average, reduce, emit_warning)
      )
  
imports: from typing import Optional
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: legacy_get_enum(size_average, reduce, emit_warning) and returns: get_enum