code: def metadata_to_double_percent_options(metadata, plain_json):
      """Metadata to double percent lines"""
      text = []
      if "title" in metadata:
          text.append(metadata.pop("title"))
      if "cell_depth" in metadata:
          text.insert(0, "%" * metadata.pop("cell_depth"))
      if "cell_type" in metadata:
          text.append(
              "[{}]".format(
                  metadata.pop("region_name", metadata.pop("cell_type"))
              )
          )
      return metadata_to_text(
          " ".join(text), metadata, plain_json=plain_json
      )
  
imports: import ast
  import re
  from json import dumps, loads
  from .languages import _JUPYTER_LANGUAGES
label_desc: Use image node_id 8 for calling a global function with example usage: metadata_to_double_percent_options(metadata, plain_json) and returns: metadata_to_text