code: def make_file_manager(
      options: Namespace, install_dir: Optional[str] = None
  ) -> FileManager:
      template_dir = os.path.join(options.source_path, "templates")
      install_dir = install_dir if install_dir else options.install_dir
      return FileManager(
          install_dir=install_dir,
          template_dir=template_dir,
          dry_run=options.dry_run,
      )
  
imports: import contextlib
  import functools
  import hashlib
  import os
  import re
  import sys
  import textwrap
  from argparse import Namespace
  from dataclasses import fields, is_dataclass
  from enum import auto, Enum
  from typing import Any, Callable, Dict, Generic, Iterable, Iterator, List, Literal, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union
  from typing_extensions import Self
  from torchgen.code_template import CodeTemplate
label_desc: Use image node_id 8 for calling a global function with example usage: make_file_manager(options, install_dir) and returns: FileManager