code: def _create_sync_map(self, sync_root):
          
          sync_map = SyncMap(tree=sync_root, rconf=self.rconf, logger=self.logger)
          if self.rconf.safety_checks:
              self.log(u"Running sanity check on computed sync map...")
              if not sync_map.leaves_are_consistent:
                  self._step_failure(ValueError(u"The computed sync map contains inconsistent fragments"))
              self.log(u"Running sanity check on computed sync map... passed")
          else:
              self.log(u"Not running sanity check on computed sync map")
          self.task.sync_map = sync_map
docs: If requested, check that the computed sync map is consistent.
          Then, add it to the Task.