code: def create_input_file(
      options: Namespace, work_folder: Path
  ) -> tuple[Path, str]:
      if options.input_file == "-":
          # stdin
          log.info("reading file from standard input")
          target = work_folder / "stdin"
          with open(target, "wb") as stream_buffer:
              copyfileobj(sys.stdin.buffer, stream_buffer)
          return target, "stdin"
      elif hasattr(options.input_file, "readable"):
          if not options.input_file.readable():
              raise InputFileError("Input file stream is not readable")
          log.info("reading file from input stream")
          target = work_folder / "stream"
          with open(target, "wb") as stream_buffer:
              copyfileobj(options.input_file, stream_buffer)
          return target, "stream"
      else:
          try:
              target = work_folder / "origin"
              safe_symlink(options.input_file, target)
              return target, os.fspath(options.input_file)
          except FileNotFoundError as e:
              msg = f"File not found - {options.input_file}"
              if _in_docker():  # pragma: no cover
                  msg += (
                      "\nDocker cannot access your working directory unless you "
                      "explicitly share it with the Docker container and set up"
                      "permissions correctly.\n"
                      "You may find it easier to use stdin/stdout:"
                      "\n"
                      "\tdocker run -i --rm jbarlow83/ocrmypdf - - <input.pdf >output.pdf"
                      "\n"
                  )
              elif _in_snap():  # pragma: no cover
                  msg += (
                      "\nSnap applications cannot access files outside of "
                      "your home directory unless you explicitly allow it. "
                      "You may find it easier to use stdin/stdout:"
                      "\n"
                      "\tsnap run ocrmypdf - - <input.pdf >output.pdf"
                      "\n"
                  )
              raise InputFileError(msg) from e
  
imports: from __future__ import annotations
  import locale
  import logging
  import os
  import sys
  import unicodedata
  from argparse import Namespace
  from collections.abc import Sequence
  from pathlib import Path
  from shutil import copyfileobj
  import pikepdf
  import PIL
  from pluggy import PluginManager
  from ocrmypdf._exec import unpaper
  from ocrmypdf.exceptions import BadArgsError, InputFileError, MissingDependencyError, OutputFileAccessError
  from ocrmypdf.helpers import is_file_writable, monotonic, safe_symlink
  from ocrmypdf.subprocess import check_external_program
label_desc: Use image node_id 16 for calling a global function with example usage: create_input_file(options, work_folder) and returns: target,  str, target,  str, target,  os