<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate(self, path, label):
 """Creates default data from the corpus at `path`, marking all works with `label`. :param path: path to a corpus directory :type path: `str` :param label: label to categorise each work as :type label: `str` """

        for filename in os.listdir(path):
            self[filename] = label