def Layout(self, request, response):
    """Render the protodict as a table."""
    self.data = []

    for key, value in sorted(self.proxy.items()):
      rendered_value = None

      if key in self.filter_keys:
        continue
      try:
        renderer = FindRendererForObject(value)
        if renderer:
          rendered_value = renderer.RawHTML(request)
        else:
          raise TypeError("Unknown renderer")

      # If the translation fails for whatever reason, just output the string
      # value literally (after escaping)
      except TypeError:
        rendered_value = self.FormatFromTemplate(self.translator_error_template,
                                                 value=value)
      except Exception as e:  # pylint: disable=broad-except
        logging.warn("Failed to render {0}. Err: {1}".format(type(value), e))

      if rendered_value is not None:
        self.data.append((key, rendered_value))

    return super(DictRenderer, self).Layout(request, response)
dataset/ETHPy150Open google/grr/grr/gui/plugins/semantic.py/DictRenderer.Layout/original