code: def _create_diet_optimizer(params):
      if params.optimizer == "DietAdam":
          return DietAdamOptimizer(params)
      else:
          raise ValueError("Unrecognized diet optimizer")
  
imports: from collections import defaultdict
  import copy
  import math
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import hparam
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: _create_diet_optimizer(params) and returns: DietAdamOptimizer