code: def _parse_source_file(filename):
      """Parse source file into AST node
  
      Parameters
      ----------
      filename : str
          File path
  
      Returns
      -------
      node : AST node
      content : utf-8 encoded string
  
      Notes
      -----
      This function adapted from the sphinx-gallery project; license: BSD-3
      https://github.com/sphinx-gallery/sphinx-gallery/
      """
  
      with open(filename, "r", encoding="utf-8") as fid:
          content = fid.read()
      # change from Windows format to UNIX for uniformity
      content = content.replace("\r\n", "\n")
  
      try:
          node = ast.parse(content)
      except SyntaxError:
          node = None
      return node, content
  
file_path: altair/sphinxext/utils.py
imports: import ast
  import hashlib
  import itertools
  import json
  import re
label_desc: Use image node_id 3 for calling a global function with example usage: _parse_source_file(filename) and returns: node,  content