code: def parse_data_format(str):
      str = str.upper()
      mace_check(
          str in [e.name for e in DataFormat],
          "unknown data format %s" % str,
      )
      return DataFormat[str]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import os
  import copy
  import yaml
  from enum import Enum
  from utils import util
  from utils.util import mace_check
  from utils.util import MaceLogger
  from py_proto import mace_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: parse_data_format(str) and returns: DataFormat