code: def add_dir(self, path, compress):
          
          if not os.path.isdir(path):
              raise ValueError('{} is not a directory'.format(path))
          for root, dirs, files in os.walk(path):
              for f in files:
                  self.add_file(os.path.join(root, f), compress)
docs: Add all files under directory `path` to the MAR file.
  
          Args:
              path (str): path to directory to add to this MAR file
              compress (str): One of 'xz', 'bz2', or None. Defaults to None.