<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def softmax_classifier(input_, num_classes, labels=None, loss_weight=None, per_example_weights=None, weights=None, bias=tf.zeros_initializer(), parameter_modifier=parameters.identity, name=PROVIDED):
 """Creates a fully-connected linear layer followed by a softmax. This returns `(softmax, loss)` where `loss` is the cross entropy loss. Args: input_: A rank 2 Tensor or a Pretty Tensor holding the activation before the logits (penultimate layer). num_classes: The number of classes. labels: The target labels to learn as a float tensor. Use None to not include a training loss. loss_weight: A scalar multiplier for the loss. per_example_weights: A Tensor with a weight per example. weights: The initializer for the weights (see `fully_connected`). bias: The initializer for the bias (see `fully_connected`). parameter_modifier: A modifier for the parameters that compute the logits. name: The optional name. Returns: A named tuple holding: softmax: The result of this layer with softmax normalization. loss: The cross entropy loss. Raises: ValueError: If the datatype is wrong. """

  full = input_.fully_connected(num_classes,
                                activation_fn=None,
                                name=name,
                                weights=weights,
                                bias=bias,
                                parameter_modifier=parameter_modifier)
  return full.softmax(labels=labels,
                      loss_weight=loss_weight,
                      per_example_weights=per_example_weights,
                      name=name)