code: def optional_file_like(path):
      
      if (os.path.exists(path) and not (os.path.isfile(path) or
                                        stat.S_ISFIFO(os.stat(path).st_mode) or
                                        stat.S_ISCHR(os.stat(path).st_mode))):
          raise ValidationFailed(
              '{} is not a valid file, character device, or fifo.'.format(path))
docs: Validator that ensures that if a file exists it regular, a fifo, or a
      character device. The file is not required to exist.
  
      This includes character special devices like /dev/null.