Return the index of a labeled config item in the beacon config, -1 if the index is not found

def _get_index(self, beacon_config, label):
        '''
        Return the index of a labeled config item in the beacon config, -1 if the index is not found
        '''

        indexes = [index for index, item in enumerate(beacon_config) if label in item]
        if not indexes:
            return -1
        else:
            return indexes[0]