def METHOD_NAME(self, *path_args):
    '''
    Request to /model/name/ will delete the trained model.
    Request to /model/name/data needs id and will delete rows from the training data.
    '''
    if self.get_data_flag():
        file_kwargs = self.listify(['id'])
        try:
            model = gramex.cache.open(self.pickle_file_path, gramex.ml.load)
        except EnvironmentError:
            self.write({'Error': 'Please Send PUT Request, model does not exist'})
            raise EnvironmentError
        gramex.data.METHOD_NAME(model.url, args=file_kwargs, id=file_kwargs['id'])
        return
    if os.path.exists(self.pickle_file_path):
        os.unlink(self.pickle_file_path)