def process_result(result, model=None):
if model is None:<EOL><INDENT>return result<EOL><DEDENT>if isinstance(result, collections.Sequence):<EOL><INDENT>return [model(**item) for item in result]<EOL><DEDENT>return model(**result)<EOL>
Cast response JSON to Betfair model(s).

    :param result: Betfair response JSON
    :param BetfairModel model: Deserialization format; if `None`, return raw
        JSON