<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_corpus(self, corpus_id):
 """Return a corpus given an ID. If the corpus ID cannot be found, an InvalidCorpusError is raised. Parameters corpus_id : str The ID of the corpus to return. Returns ------- Corpus The corpus with the given ID. """

        try:
            corpus = self.corpora[corpus_id]
            return corpus
        except KeyError:
            raise InvalidCorpusError