<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_external_path(self, path):

 """
 Adds an external path to the combobox if it exists on the file system.
 If the path is already listed in the combobox, it is removed from its
 current position and added back at the end. If the maximum number of
 paths is reached, the oldest external path is removed from the list.
 """

        if not osp.exists(path):
            return
        self.removeItem(self.findText(path))
        self.addItem(path)
        self.setItemData(self.count() - 1, path, Qt.ToolTipRole)
        while self.count() > MAX_PATH_HISTORY + EXTERNAL_PATHS:
            self.removeItem(EXTERNAL_PATHS)