code: def sympy_dir() -> pathlib.Path:
      """Returns the root SymPy directory."""
      return pathlib.Path(__file__).parents[2]
  
imports: import functools
  import importlib.util
  import os
  import pathlib
  import re
  from fnmatch import fnmatch
  from typing import List, Optional, Tuple
  from sympy.testing.runtests import test
label_desc: Use image node_id 1 for calling a global function with example usage: sympy_dir() and returns: pathlib