def get_tab_by_locator(tab_list, usage_key_string):
 tab_location = UsageKey.from_string(usage_key_string)
 item = modulestore().get_item(tab_location)
 static_tab = StaticTab(name=item.display_name, url_slug=item.location.name)
 return CourseTabList.get_tab_by_id(tab_list, static_tab.tab_id)

def get_tab_by_locator ( tab_list , usage_key_string ) : tab_location = UsageKey . from_string ( usage_key_string ) item = modulestore ( ) . get_item ( tab_location ) static_tab = StaticTab ( name = item . display_name , url_slug = item . location . name ) return CourseTabList . get_tab_by_id ( tab_list , static_tab . tab_id )
look for a tab with the specified locator .