code: def list_templates(config: Config) -> None:
      """List available templates.
  
      :param config: a :class:`.Config` object.
  
      """
  
      config.print_stdout("Available templates:\n")
      for tempname in os.listdir(config.get_template_directory()):
          with open(
              os.path.join(
                  config.get_template_directory(), tempname, "README"
              )
          ) as readme:
              synopsis = next(readme).rstrip()
          config.print_stdout("%s - %s", tempname, synopsis)
  
      config.print_stdout(
          "\nTemplates are used via the 'init' command, e.g.:"
      )
      config.print_stdout(
          "\n  alembic init --template generic ./scripts"
      )
  
imports: from __future__ import annotations
  import os
  from typing import List
  from typing import Optional
  from typing import TYPE_CHECKING
  from typing import Union
  from .None import autogenerate
  from .None import util
  from .runtime.environment import EnvironmentContext
  from .script import ScriptDirectory
label_desc: Use image node_id 1 for calling a global function with example usage: list_templates(config) without return types