code: def rst_table(data, schema=None):
    
    # Process multi-rows (replaced by rows with empty columns when needed)
    pdata = []
    for row in data:
      prow = [el if isinstance(el, list) else [el] for el in row]
      pdata.extend(pr for pr in xzip_longest(*prow, fillvalue=""))
  
    # Find the columns sizes
    sizes = [max(len("{0}".format(el)) for el in column)
             for column in xzip(*pdata)]
    sizes = [max(size, len(sch)) for size, sch in xzip(sizes, schema)]
  
    # Creates the title and border rows
    if schema is None:
      schema = pdata[0]
      pdata = pdata[1:]
    border = " ".join("=" * size for size in sizes)
    titles = " ".join("{1:^{0}}".format(*pair)
                      for pair in xzip(sizes, schema))
  
    # Creates the full table and returns
    rows = [border, titles, border]
    rows.extend(" ".join("{1:<{0}}".format(*pair)
                         for pair in xzip(sizes, row))
                for row in pdata)
    rows.append(border)
    return rows
docs: Creates a reStructuredText simple table (list of strings) from a list of
    lists.