<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def l2_regularizer(decay, name_filter='weights'):
 """Create an l2 regularizer."""

  return regularizer(
      'l2_regularizer',
      lambda x: tf.nn.l2_loss(x) * decay,
      name_filter=name_filter)