code: def cast_to_python(self, value):
          
          # v2.x does not provide a distinction between users and groups at the field selection level, can only return
          # UserGroup instances instead of specific User or Group instances
          if value is not None:
              value = UserGroup(self._swimlane, value)
  
          return value
docs: Convert JSON definition to UserGroup object