code: def from_json(cls, obj):
          
          if len(obj) == 2:
              (field, operator) = obj
              return cls(field, operator)
          if len(obj) > 2:
              (field, operator, value) = obj
              return cls(field, operator, value)
docs: Construct a MarathonConstraint from a parsed response.
  
          :param dict attributes: object attributes from parsed response
  
          :rtype: :class:`MarathonConstraint`