<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def realpath(self, filename):
 """Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path. """

        if self.filesystem.is_windows_fs:
            return self.abspath(filename)
        filename = make_string_path(filename)
        path, ok = self._joinrealpath(filename[:0], filename, {})
        return self.abspath(path)