def _GetFieldAttributes(field):
if not isinstance(field, messages.Field):<EOL><INDENT>raise TypeError('<STR_LIT>' % (field,))<EOL><DEDENT>positional_args = []<EOL>kwargs = {<EOL>'<STR_LIT>': field.required,<EOL>'<STR_LIT>': field.repeated,<EOL>'<STR_LIT>': field.variant,<EOL>'<STR_LIT:default>': field._Field__default,  <EOL>}<EOL>if isinstance(field, messages.MessageField):<EOL><INDENT>kwargs.pop('<STR_LIT:default>')<EOL>if not isinstance(field, message_types.DateTimeField):<EOL><INDENT>positional_args.insert(<NUM_LIT:0>, field.message_type)<EOL><DEDENT><DEDENT>elif isinstance(field, messages.EnumField):<EOL><INDENT>positional_args.insert(<NUM_LIT:0>, field.type)<EOL><DEDENT>return positional_args, kwargs<EOL>
Decomposes field into the needed arguments to pass to the constructor.

    This can be used to create copies of the field or to compare if two fields
    are "equal" (since __eq__ is not implemented on messages.Field).

    Args:
      field: A ProtoRPC message field (potentially to be copied).

    Raises:
      TypeError: If the field is not an instance of messages.Field.

    Returns:
      A pair of relevant arguments to be passed to the constructor for the field
        type. The first element is a list of positional arguments for the
        constructor and the second is a dictionary of keyword arguments.