code: def _build_table_cells(
      contents, cell_length, bottom_sep_char, top_sep_char=None
  ):
      cells = []
      for i, content in enumerate(contents):
          right_bar = ""
          right_plus = ""
          if i == len(contents) - 1:
              right_bar = "|"
              right_plus = "+"
          blank_suffix_length = cell_length - len(content) - 1
          blank_suffix = blank_suffix_length * " "
          cell_prefix = ""
          if top_sep_char is not None:
              top_line_sep = cell_length * top_sep_char
              cell_prefix = "+%s%s\n" % (top_line_sep, right_plus)
          bottom_line_sep = cell_length * bottom_sep_char
          cell = """
  %s| %s%s%s
  +%s%s""" % (
              cell_prefix,
              content,
              blank_suffix,
              right_bar,
              bottom_line_sep,
              right_plus,
          )
          cells.append(cell)
      cell_lines = zip(*(c.split("\n") for c in cells))
      cell_lines = ["".join(line) for line in cell_lines]
      cell = "\n".join(cell_lines)
      return cell
  
file_path: snips-nlu/docs/write_ontology_doc.py
imports: from pathlib import Path
  from snips_nlu_parsers.builtin_entities import get_complete_entity_ontology, get_all_gazetteer_entities
label_desc: Use image node_id 6 for calling a global function with example usage: _build_table_cells(contents, cell_length, bottom_sep_char, top_sep_char) and returns: cell