<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_field_value(self, key, default=None):
 """Retrieves the value in the payload field if the field exists, otherwise returns the default. :API: public """

    if key in self._fields:
      payload_field = self._fields[key]
      if payload_field:
        return payload_field.value
    return default