<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, revision, operators):
 """ Add a revision to the index. :param revision: The revision. :type revision: :class:`Revision` or :class:`LazyRevision` """

        ir = IndexedRevision(
            revision=revision, operators=[operator.name for operator in operators]
        )
        self._revisions[revision.key] = ir
        return ir