code: def standardize_reduction(reduction):
      allowed = {"sum_over_batch_size", "sum", None, "none"}
      if reduction not in allowed:
          raise ValueError(
              "Invalid value for argument `reduction`. "
              f"Expected one of {allowed}. Received: "
              f"reduction={reduction}"
          )
      return reduction
  
file_path: keras/keras/losses/loss.py
imports: import tree
  from keras import backend
  from keras import ops
  from keras.api_export import keras_export
  from keras.utils.naming import auto_name
label_desc: Use image node_id 1 for calling a global function with example usage: standardize_reduction(reduction) and returns: reduction