code: def simple_inline_formatting(cells):
      """
      rST doesn't easily supported nested formatting, such as Markdown like [some `code` within a
      link](...) or **`bold code`**, so we disallow it.
      http://docutils.sourceforge.net/FAQ.html#is-nested-inline-markup-possible
      """
  
      errors = []
      for cell in cells:
          if not isinstance(cell, MarkdownCell):
              continue
  
          for elem, entering in cell.ast.walker():
              if not entering:
                  # only look at things once
                  continue
  
              if not is_inline(elem):
                  # not an inline formatting, so not relevant
                  continue
  
              if all(
                  is_text(child) or is_image(child)
                  for child in direct_children(elem)
              ):
                  # if all of the children are plain text or images, this is perfect!
                  continue
  
              # an inline element that contains non-text elements, error!
              summary = syntax_summary(elem)
              if summary is None:
                  summary = ""
              else:
                  summary = f" (`` {summary} ``)"
  
              suggestions = ["removing the some of the formatting"]
              if is_link(elem):
                  suggestions.append(
                      f"placing the link separately (like `<text> ([link](<url>))` or `<text> ([docs](<url>))`)"
                  )
  
              errors.append(
                  message_with_line(
                      cell,
                      f"Found some nested formatting within a {elem.t} element{summary}, which isn't supported in reStructuredText, as used by Sphinx and Read the Docs. Consider: {'; '.join(suggestions)}",
                      sourcepos=closest_parent_sourcepos(elem),
                  )
              )
  
      if errors:
          raise FormattingError(errors)
  
imports: import argparse
  import commonmark
  import nbformat
  import os
  import re
  import subprocess
  import sys
  import textwrap
  from pathlib import Path
label_desc: Use image node_id 20 for calling a global function with example usage: simple_inline_formatting(cells) without return types