<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_root_dir(self):
 """Retrieve the absolute path to the root directory of this data source. Returns: str: absolute path to the root directory of this data source. """

        if os.path.isdir(self.root_path):
            return self.root_path
        else:
            return os.path.dirname(self.root_path)