code: def normalizeFilename(filename):
      
      result = os.path.expanduser(filename)
      result = os.path.abspath(result)
      return result
docs: Take a given filename and return the normalized version of it.
      Where ~/ is expanded to the full OS specific home directory and all
      relative path elements are resolved.