def MakeFieldString(field):
  """Represents OptWrapper as a string prepending '(opt)' for optional fields.

  Args:
    field: an OptWrapper for a field

  Returns:
    a string representation of the field
  """
  field_str = ''
  if field.optional:
    field_str += '(opt) '
  field_str += '{0}/{1}{2}'.format(field.field.namespace, field.field.field,
                                   field.field.increment)
  return field_str