code: def normpath(filename: _Path) -> str:
      """Normalize a file/dir name for comparison purposes."""
      # See pkg_resources.normalize_path for notes about cygwin
      file = (
          os.path.abspath(filename)
          if sys.platform == "cygwin"
          else filename
      )
      return os.path.normcase(os.path.realpath(os.path.normpath(file)))
  
imports: import os
  import sys
  from typing import Union
label_desc: Use image node_id 3 for calling a global function with example usage: normpath(filename) and returns: os