parameters: (input_path: str, tfs: TempFileSaver,
                                options: ImportOptions)
return_statement: return cl
docstring: Builds a command line for invoking the import stage.
  
    Args:
      input_path: The input path.
      tfs: TempFileSaver.
      options: Import options.
    Returns:
      List of strings of command line.
docstring_summary: Builds a command line for invoking the import stage.
docstring_tokens: Builds a command line for invoking the import stage .
function: def build_import_command_line(input_path: str, tfs: TempFileSaver,
                                options: ImportOptions) -> List[str]:
    """Builds a command line for invoking the import stage.
  
    Args:
      input_path: The input path.
      tfs: TempFileSaver.
      options: Import options.
    Returns:
      List of strings of command line.
    """
    import_tool = find_tool(_IMPORT_TOOL)
    cl = [
        import_tool,
        input_path,
        f"--xla-format={options.import_format.value}",
    ]
  
    if options.import_only and options.output_file:
      # Import stage directly outputs.
      output_file = tfs.alloc_optional("xla-output.mlir",
                                       export_as=options.output_file)
      cl.append(f"-o={output_file}")
  
    # MLIR flags.
    if options.output_mlir_debuginfo:
      cl.append("--mlir-print-debuginfo")
    if options.output_generic_mlir:
      cl.append("--mlir-print-op-generic")
  
    # Save temps flags.
    save_mhlo_input = tfs.alloc_optional("tf-mhlo.mlir",
                                         export_as=options.save_temp_mhlo_input)
    if save_mhlo_input:
      cl.append(f"--save-temp-mhlo-input={save_mhlo_input}")
    iree_input = tfs.alloc_optional("xla-iree-input.mlir",
                                    export_as=options.save_temp_iree_input)
    if iree_input:
      cl.append(f"--save-temp-iree-input={iree_input}")
  
    # Crash reproducer (locally qualified).
    requested_crash_reproducer_path = options.crash_reproducer_path
    if requested_crash_reproducer_path:
      requested_crash_reproducer_path = (requested_crash_reproducer_path +
                                         ".import-xla")
    crash_reproducer_path = tfs.alloc_optional(
        "xla-reproducer.mlir", export_as=requested_crash_reproducer_path)
    if crash_reproducer_path:
      cl.append(f"--pass-pipeline-crash-reproducer={crash_reproducer_path}")
  
    # Extra args.
    cl.extend(options.import_extra_args)
    return cl
function_tokens: def build_import_command_line ( input_path : str , tfs : TempFileSaver , options : ImportOptions ) -> List [ str ] : import_tool = find_tool ( _IMPORT_TOOL ) cl = [ import_tool , input_path , f"--xla-format={options.import_format.value}" , ] if options . import_only and options . output_file : # Import stage directly outputs. output_file = tfs . alloc_optional ( "xla-output.mlir" , export_as = options . output_file ) cl . append ( f"-o={output_file}" ) # MLIR flags. if options . output_mlir_debuginfo : cl . append ( "--mlir-print-debuginfo" ) if options . output_generic_mlir : cl . append ( "--mlir-print-op-generic" ) # Save temps flags. save_mhlo_input = tfs . alloc_optional ( "tf-mhlo.mlir" , export_as = options . save_temp_mhlo_input ) if save_mhlo_input : cl . append ( f"--save-temp-mhlo-input={save_mhlo_input}" ) iree_input = tfs . alloc_optional ( "xla-iree-input.mlir" , export_as = options . save_temp_iree_input ) if iree_input : cl . append ( f"--save-temp-iree-input={iree_input}" ) # Crash reproducer (locally qualified). requested_crash_reproducer_path = options . crash_reproducer_path if requested_crash_reproducer_path : requested_crash_reproducer_path = ( requested_crash_reproducer_path + ".import-xla" ) crash_reproducer_path = tfs . alloc_optional ( "xla-reproducer.mlir" , export_as = requested_crash_reproducer_path ) if crash_reproducer_path : cl . append ( f"--pass-pipeline-crash-reproducer={crash_reproducer_path}" ) # Extra args. cl . extend ( options . import_extra_args ) return cl