code: def tables(action):
      compare = action == "compare"
      for file_fmt in FILES:
          new_table = file_fmt.render(COLUMNS, ALGORITHMS)
          file_name = file_fmt.file_name
          separator = file_fmt.separator
  
          base_dir = os.path.dirname(file_name)
          invalid_links = [
              (written, rendered)
              for written, rendered in itertools.chain(
                  find_links(COLUMNS, file_fmt),
                  find_links(ALGORITHMS, file_fmt),
              )
              if not link_is_valid_relative(rendered, base_dir)
          ]
  
          if invalid_links:
              formatted = "\n".join(
                  f"- `{written}` (missing target: `{base_dir}/{rendered}`)"
                  for written, rendered in invalid_links
              )
              error(
                  f"expected all links in algorithm specifications in `{__file__}` to be relative links that are valid starting at `{base_dir}`, but found {len(invalid_links)} invalid:\n\n{formatted}",
                  edit_fixit=True,
              )
  
          separate_compare_overwrite(
              file_name,
              separator,
              action=action,
              new_middle=new_table,
              label="table",
          )
  
imports: import abc
  import argparse
  import contextlib
  import difflib
  import enum
  import glob
  import itertools
  import json
  import nbformat
  import os.path
  import re
  import subprocess
  import sys
  import textwrap
label_desc: Use image node_id 7 for calling a global function with example usage: tables(action) without return types