def write_symbol_table_dict(
    output_file,
    symbol_table_dict,
    restrict_to = ()
):  # pytype: disable=annotation-type-mismatch
  """Write a dictionary of SymbolTable values to a file.

  Args:
    output_file: Filename string or FileLike object.
    symbol_table_dict: Map from type_name to SymbolTable values.
    restrict_to: If defined, a list of types to restrict to.
  """
  output_dict = {
      type_name: symbol_table.to_dict()
      for type_name, symbol_table in symbol_table_dict.items()
      if not restrict_to or type_name in restrict_to
  }
  _write_numpy_item(output_file, output_dict)
Write a dictionary of SymbolTable values to a file.

  Args:
    output_file: Filename string or FileLike object.
    symbol_table_dict: Map from type_name to SymbolTable values.
    restrict_to: If defined, a list of types to restrict to.
  
language/nql/nql/io.py