code: def build_mode(arg_namespace):
      
      custom_temps = arg_namespace.template or []
      temp_paths = [rel_to_cwd('templates', temp) for temp in custom_temps]
  
      try:
          builder.build(templates=temp_paths,
                        schemes=arg_namespace.scheme,
                        base_output_dir=arg_namespace.output)
      except (LookupError, PermissionError) as exception:
          if isinstance(exception, LookupError):
              print('Necessary resources for building not found in current '
                    'working directory.')
          if isinstance(exception, PermissionError):
              print("No write permission for output directory.")
docs: Check command line arguments and run build function.