Returns the path of learningData.csv in a dataset

def _get_learning_data_resource(self):
        """
        Returns the path of learningData.csv in a dataset
        """
        for res in self.dsDoc['dataResources']:
            resPath = res['resPath']
            resType = res['resType']
            if resType == 'table':
                if 'learningData.csv' in resPath:
                    return res
                else:
                    raise RuntimeError('could not find learningData.csv')

        # if the for loop is over and learningDoc is not found, then return None
        raise RuntimeError('could not find learningData resource')