code: def set_image_data_format(data_format):
      """Set the value of the image data format convention.
  
      Args:
          data_format: string. `'channels_first'` or `'channels_last'`.
  
      Examples:
  
      >>> keras.config.image_data_format()
      'channels_last'
  
      >>> keras.config.set_image_data_format('channels_first')
      >>> keras.config.image_data_format()
      'channels_first'
  
      >>> # Set it back to `'channels_last'`
      >>> keras.config.set_image_data_format('channels_last')
  
      """
      global _IMAGE_DATA_FORMAT
      data_format = str(data_format).lower()
      if data_format not in {"channels_first", "channels_last"}:
          raise ValueError(
              "The `data_format` argument must be one of "
              "{'channels_first', 'channels_last'}. "
              f"Received: data_format={data_format}"
          )
      _IMAGE_DATA_FORMAT = data_format
  
file_path: keras/keras/backend/config.py
imports: import json
  import os
  from keras.api_export import keras_export
label_desc: Use image node_id 6 for calling a global function with example usage: set_image_data_format(data_format) without return types