class_docstr: Write source lines to file and render with Graphviz.
class_docstr_tok: ["Write","source","lines","to","file","and","render","with","Graphviz","."]
docstr: Start the right viewer based on file format and platform.
docstr_tok: ["Start","the","right","viewer","based","on","file","format","and","platform","."]
code: def _view(
      self,
      filepath: typing.Union[os.PathLike, str],
      *,
      format: str,
      quiet: bool,
  ) -> None:
      """Start the right viewer based on file format and platform."""
      methodnames = [
          f"_view_{format}_{backend.viewing.PLATFORM}",
          f"_view_{backend.viewing.PLATFORM}",
      ]
      for name in methodnames:
          view_method = getattr(self, name, None)
          if view_method is not None:
              break
      else:
          raise RuntimeError(
              f"{self.__class__!r} has no built-in viewer"
              f" support for {format!r}"
              f" on {backend.viewing.PLATFORM!r} platform"
          )
      view_method(filepath, quiet=quiet)
  
file_path: graphviz/graphviz/rendering.py
imports: import logging
  import os
  import pathlib
  import typing
  from .None import _tools
  from .None import backend
  from .None import saving
label_desc: Use image node_id 2 for calling the Render obj's underlying member method code with example usage: obj._view(filepath) without return types