code: def for_json(self):
          
  
          if self.multiselect:
              return super(MultiSelectField, self).for_json()
  
          value = self.get_python()
          if hasattr(value, 'for_json'):
              return value.for_json()
  
          return value
docs: Handle multi-select vs single-select