code: def add(self, path, compress=None):
          
          if os.path.isdir(path):
              self.add_dir(path, compress)
          else:
              self.add_file(path, compress)
docs: Add `path` to the MAR file.
  
          If `path` is a file, it will be added directly.
          If `path` is a directory, it will be traversed recursively and all
          files inside will be added.
  
          Args:
              path (str): path to file or directory on disk to add to this MAR
                  file
              compress (str): One of 'xz', 'bz2', or None. Defaults to None.