code: def parse_result(cls, result):
          
          if isinstance(result, tuple) == 2:
              items, context = result
          else:
              context = {}
              items = result
          return items, context
docs: Parse a simple items result.
  
          May either be two item tuple containing items and a context dictionary (see: relation convention)
          or a list of items.