<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromJSON(jdata):
 """ Creates a new Query object from the given JSON data. :param jdata | <dict> :return <orb.Query> || <orb.QueryCompound> """

        if jdata['type'] == 'compound':
            queries = [orb.Query.fromJSON(jquery) for jquery in jdata['queries']]
            out = orb.QueryCompound(*queries)
            out.setOp(orb.QueryCompound.Op(jdata['op']))
            return out
        else:
            if jdata.get('model'):
                model = orb.schema.model(jdata.get('model'))
                if not model:
                    raise orb.errors.ModelNotFound(schema=jdata.get('model'))
                else:
                    column = (model, jdata['column'])
            else:
                column = (jdata['column'],)

            query = orb.Query(*column)
            query.setOp(orb.Query.Op(jdata.get('op', 'Is')))
            query.setInverted(jdata.get('inverted', False))
            query.setCaseSensitive(jdata.get('caseSensitive', False))
            query.setValue(jdata.get('value'))

            # restore the function information
            for func in jdata.get('functions', []):
                query.addFunction(orb.Query.Function(func))

            # restore the math information
            for entry in jdata.get('math', []):
                query.addMath(orb.Query.Math(entry.get('op')), entry.get('value'))
            return query