code: def process_result(result, model=None):
      
      if model is None:
          return result
      if isinstance(result, collections.Sequence):
          return [model(**item) for item in result]
      return model(**result)
docs: Cast response JSON to Betfair model(s).
  
      :param result: Betfair response JSON
      :param BetfairModel model: Deserialization format; if `None`, return raw
          JSON