code: def _is_path(instance, attribute, s, exists=True):
      "Validator for path-yness"
      if not s:
          # allow False as a default
          return
      if exists:
          if os.path.exists(s):
              return
          else:
              raise OSError("path does not exist")
      else:
          # how do we tell if it's a path if it doesn't exist?
          raise TypeError("Not a path?"f _is_path(instance, attribute, s, exists=True):
      "Validator for path-yness"
      if not s:
          # allow False as a default
          return
      if exists:
          if os.path.exists(s):
              return
          else:
              raise OSError("path does not exist")
      else:
          # how do we tell if it's a path if it doesn't exist?
          raise TypeError("Not a path?")
docs: Validator for path-yness