def __validate_simple_subfield(self, parameter, field, segment_list,<EOL>_segment_index=<NUM_LIT:0>):
if _segment_index >= len(segment_list):<EOL><INDENT>if isinstance(field, messages.MessageField):<EOL><INDENT>field_class = field.__class__.__name__<EOL>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' % (parameter, field_class))<EOL><DEDENT>return<EOL><DEDENT>segment = segment_list[_segment_index]<EOL>parameter += '<STR_LIT:.>' + segment<EOL>try:<EOL><INDENT>field = field.type.field_by_name(segment)<EOL><DEDENT>except (AttributeError, KeyError):<EOL><INDENT>raise TypeError('<STR_LIT>' % (parameter,))<EOL><DEDENT>self.__validate_simple_subfield(parameter, field, segment_list,<EOL>_segment_index=_segment_index + <NUM_LIT:1>)<EOL>
Verifies that a proposed subfield actually exists and is a simple field.

        Here, simple means it is not a MessageField (nested).

        Args:
          parameter: String; the '.' delimited name of the current field being
              considered. This is relative to some root.
          field: An instance of a subclass of messages.Field. Corresponds to the
              previous segment in the path (previous relative to _segment_index),
              since this field should be a message field with the current segment
              as a field in the message class.
          segment_list: The full list of segments from the '.' delimited subfield
              being validated.
          _segment_index: Integer; used to hold the position of current segment so
              that segment_list can be passed as a reference instead of having to
              copy using segment_list[1:] at each step.

        Raises:
          TypeError: If the final subfield (indicated by _segment_index relative
            to the length of segment_list) is a MessageField.
          TypeError: If at any stage the lookup at a segment fails, e.g if a.b
            exists but a.b.c does not exist. This can happen either if a.b is not
            a message field or if a.b.c is not a property on the message class from
            a.b.