code: def copy_template(flags_dict: Dict[str, Any]) -> None:
      """Copy template flags_dict["model"] to flags_dict["dest_dir"].
  
      Copies all *.py and README files in specified template, and replace
      the content of the files.
  
      Args:
        flags_dict: Should have pipeline_name, model and dest_dir.
      """
      model = flags_dict[labels.MODEL]
      pipeline_name = _sanitize_pipeline_name(
          flags_dict[labels.PIPELINE_NAME]
      )
      template_dir = os.path.join(_templates_src_dir(), model)
      if not os.path.isdir(template_dir):
          raise ValueError("Model {} does not exist.".format(model))
      destination_dir = flags_dict[labels.DESTINATION_PATH]
  
      ignore_paths = {
          os.path.join(template_dir, x)
          for x in _IGNORE_FILE_PATHS.get(model, [])
      }
      replace_dict = {
          _IMPORT_FROM_PACKAGE: _IMPORT_FROM_LOCAL_DIR,
          _PLACEHOLDER_PIPELINE_NAME: pipeline_name,
      }
      _copy_and_replace_placeholder_dir(
          template_dir, destination_dir, ignore_paths, replace_dict
      )
      for additional_file in _ADDITIONAL_FILE_PATHS.get(model, []):
          dst_path = os.path.join(destination_dir, additional_file.dst)
          fileio.makedirs(os.path.dirname(dst_path))
  
          if additional_file.src.startswith(("http://", "https://")):
              urllib.request.urlretrieve(additional_file.src, dst_path)
          else:
              src_path = os.path.join(
                  _tfx_src_dir(), additional_file.src
              )
              fileio.copy(src_path, dst_path)
  
file_path: tfx/tfx/tools/cli/handler/template_handler.py
imports: import collections
  import os
  import re
  from typing import Dict, Any, List, Pattern, Set
  import urllib.request
  import click
  from tfx.dsl.io import fileio
  from tfx.tools.cli import labels
label_desc: Use image node_id 7 for calling a global function with example usage: copy_template(flags_dict) without return types