<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merge_directories(self, directory_digests):
 """Merges any number of directories. :param directory_digests: Tuple of DirectoryDigests. :return: A Digest. """

    result = self._native.lib.merge_directories(
      self._scheduler,
      self._to_value(_DirectoryDigests(directory_digests)),
    )
    return self._raise_or_return(result)