code: def print_block_string(
      value: str, indentation: str = "", prefer_multiple_lines: bool = False
  ) -> str:
      
      is_single_line = "\n" not in value
      has_leading_space = value.startswith(" ") or value.startswith("\t")
      has_trailing_quote = value.endswith('"')
      print_as_multiple_lines = (
          not is_single_line or has_trailing_quote or prefer_multiple_lines
      )
  
      # Format a multi-line block quote to account for leading space.
      if print_as_multiple_lines and not (is_single_line and has_leading_space):
          result = "\n" + indentation
      else:
          result = ""
      result += value.replace("\n", "\n" + indentation) if indentation else value
      if print_as_multiple_lines:
          result += "\n"
  
      return '"""' + result.replace('"""', '\\"""') + '"""'
docs: Print a block string in the indented block form.
  
      Prints a block string in the indented block form by adding a leading and
      trailing blank line. However, if a block string starts with whitespace and
      is a single-line, adding a leading blank line would strip that whitespace.