<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __parameter_default(self, final_subfield):
 """Returns default value of final subfield if it has one. If this subfield comes from a field list returned from __field_to_subfields, none of the fields in the subfield list can have a default except the final one since they all must be message fields. Args: final_subfield: A simple field from the end of a subfield list. Returns: The default value of the subfield, if any exists, with the exception of an enum field, which will have its value cast to a string. """

    if final_subfield.default:
      if isinstance(final_subfield, messages.EnumField):
        return final_subfield.default.name
      else:
        return final_subfield.default