def Layout(self, request, response):
    """Render the protobuf as a table."""
    # Remove these from the request in case we need to pass it to another
    # renderer.
    start = int(request.REQ.pop("start", 0))
    length = int(request.REQ.pop("length", 10))

    # We can get called again to render from an existing cache.
    cache = request.REQ.pop("cache", None)
    if cache:
      self.cache = aff4.FACTORY.Open(cache, token=request.token)
      self.proxy = rdf_protodict.RDFValueArray(self.cache.Read(1000000))

    else:
      # We need to create a cache if this is too long.
      if length > len(self.proxy):
        # Make a cache
        with aff4.FACTORY.Create(None, "TempMemoryFile",
                                 token=request.token) as self.cache:
          data = rdf_protodict.RDFValueArray()
          data.Extend(self.proxy)
          self.cache.Write(data.SerializeToString())

    self.data = []

    self.next_start = 0
    for i, element in enumerate(self.proxy):
      if i < start:
        continue

      elif len(self.data) > length:
        self.next_start = i
        self.length = 100
        break

      renderer = FindRendererForObject(element)
      if renderer:
        try:
          self.data.append(renderer.RawHTML(request))
        except Exception as e:  # pylint: disable=broad-except
          logging.error(
              "Unable to render %s with %s: %s", type(element), renderer, e)

    response = super(RDFValueArrayRenderer, self).Layout(request, response)
    if self.next_start:
      response = self.CallJavascript(response, "RDFValueArrayRenderer.Layout",
                                     next_start=self.next_start,
                                     cache_urn=self.cache.urn,
                                     array_length=self.length)
    return response
dataset/ETHPy150Open google/grr/grr/gui/plugins/semantic.py/RDFValueArrayRenderer.Layout/swapped operands of `>`