code: def extract_file_config(content):
      """
      Pull out the file-specific config specified in the docstring.
      """
  
      prop_pat = re.compile(
          r"^\s*#\s*sphinx_gallery_([A-Za-z0-9_]+)\s*=\s*(.+)\s*$",
          re.MULTILINE,
      )
      file_conf = {}
      for match in re.finditer(prop_pat, content):
          name = match.group(1)
          value = match.group(2)
          try:
              value = ast.literal_eval(value)
          except (SyntaxError, ValueError):
              logger.warning(
                  "Sphinx-gallery option %s was passed invalid value %s",
                  name,
                  value,
              )
          else:
              file_conf[name] = value
      return file_conf
  
imports: from __future__ import division, absolute_import, print_function
  import ast
  import re
  from textwrap import dedent
label_desc: Use image node_id 2 for calling a global function with example usage: extract_file_config(content) and returns: file_conf