docs: def dirname(path: Optional[str]) -> Optional[str]:
      """ Returns the directory component of a pathname and None if the argument is None """
      if path is not None:
          return os.path.dirname(path)