def METHOD_NAME(tables: [dict], files: [str], cl: dict) -> str:
  doc = {}
  for i, tab in enumerate(tables):
    file = files[i]
    doc[file] = dict(tab)
  cols = shutil.get_terminal_size((80, 20)).columns
  if cl.format == 'yaml':
    return yaml.dump(doc, Dumper=YamlDumper, width=cols)
  return pprint.PrettyPrinter(indent=2, width=cols).pformat(doc)