code: def validate_data_format_str(data_format):
      """A function that validates the data format string."""
      if data_format not in (
          _CH_DEFAULT_STR,
          _CH_FIRST_STR,
          _CH_LAST_STR,
      ):
          raise ValueError(
              "data_format should be one of {}".format(
                  str([_CH_FIRST_STR, _CH_LAST_STR, _CH_DEFAULT_STR])
              )
              + " but we received {}".format(data_format)
          )
  
file_path: kapre/kapre/backend.py
imports: from tensorflow.keras import backend
  import tensorflow
  import numpy
  import librosa
label_desc: Use image node_id 2 for calling a global function with example usage: validate_data_format_str(data_format) without return types