def render_dashboard(category, tabs, prefix):
    """Renders a dashboard config string.

    Follows this format:
      {
        name = 'dashboard_name'
        dashboard_tab = [
          tab('tab-name', 'test-group-name'),
          ...
        ]
      }
    """
    if '\'' in prefix:
      raise ValueError(prefix)
    if '\'' in category:
      raise ValueError(category)
    for tab in tabs:
      if '\'' in tab:
        raise ValueError(tab, tabs)
    return """{
  name = '%(prefix)s-%(category)s'
  dashboard_tab = [
    %(tabs)s
  ]
},""" % dict(
    prefix=prefix,
    category=category,
    tabs='\n    '.join('tab(\'%s\', \'%s\'),' % (tab, path)
                       for (tab, path) in sorted(tabs)))