  def iter_options(grouped_choices, cutoff=None, cutoff_text=None):
      """
      Helper function for options and option groups in templates.
      """
      class StartOptionGroup(object):
          start_option_group = True
          end_option_group = False
  
          def __init__(self, label):
              self.label = label
 
</s> remove     class EndOptionGroup(object):
 </s> add     class EndOptionGroup: </s> remove     class Option(object):
 </s> add     class Option: </s> remove         class MockPager(object):
 </s> add         class MockPager: </s> remove             field.run_validation(u'slug-99-\u0420')
 </s> add             field.run_validation('slug-99-\u0420') </s> remove         super(StringRelatedField, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs)
    class StartOptionGroup:
  def iter_options(grouped_choices, cutoff=None, cutoff_text=None):
      """
      Helper function for options and option groups in templates.
      """
    class StartOptionGroup:
          start_option_group = True
          end_option_group = False
  
          def __init__(self, label):
              self.label = label
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/fields.py