<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def access(self, path, mode, dir_fd=None, follow_symlinks=None):
 """Check if a file exists and has the specified permissions. Args: path: (str) Path to the file. mode: (int) Permissions represented as a bitwise-OR combination of os.F_OK, os.R_OK, os.W_OK, and os.X_OK. dir_fd: If not `None`, the file descriptor of a directory, with `path` being relative to this directory. New in Python 3.3. follow_symlinks: (bool) If `False` and `path` points to a symlink, the link itself is queried instead of the linked object. New in Python 3.3. Returns: bool, `True` if file is accessible, `False` otherwise. """

        if follow_symlinks is not None and sys.version_info < (3, 3):
            raise TypeError("access() got an unexpected "
                            "keyword argument 'follow_symlinks'")
        path = self._path_with_dir_fd(path, self.access, dir_fd)
        try:
            stat_result = self.stat(path, follow_symlinks=follow_symlinks)
        except OSError as os_error:
            if os_error.errno == errno.ENOENT:
                return False
            raise
        if is_root():
            mode &= ~os.W_OK
        return (mode & ((stat_result.st_mode >> 6) & 7)) == mode