<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_selected(self, ):
 """Create a new reftrack with the selected element and type and add it to the root. :returns: None :rtype: None :raises: NotImplementedError """

        browser = self.shot_browser if self.browser_tabw.currentIndex() == 1 else self.asset_browser
        selelements = browser.selected_indexes(2)
        if not selelements:
            return
        seltypes = browser.selected_indexes(3)
        if not seltypes:
            return
        elementi = selelements[0]
        typi = seltypes[0]
        if not elementi.isValid() or not typi.isValid():
            return
        element = elementi.internalPointer().internal_data()
        typ = typi.internalPointer().internal_data()[0]

        reftrack.Reftrack(self.root, self.refobjinter, typ=typ, element=element)