code: def add_to_manifest(self, rel_path, checksums):
          # type: (Text, Dict[str,str]) -> None
          
          self.self_check()
          if posixpath.isabs(rel_path):
              raise ValueError("rel_path must be relative: %s" % rel_path)
  
          if posixpath.commonprefix(["data/", rel_path]) == "data/":
              # payload file, go to manifest
              manifest = "manifest"
          else:
              # metadata file, go to tag manifest
              manifest = "tagmanifest"
  
          # Add checksums to corresponding manifest files
          for (method, hash_value) in checksums.items():
              # File not in manifest because we bailed out on
              # existence in bagged_size above
              manifestpath = os.path.join(
                  self.folder, "%s-%s.txt" % (manifest, method.lower()))
              # encoding: match Tag-File-Character-Encoding: UTF-8
              # newline: ensure LF also on Windows
              with open(manifestpath, "a", encoding=ENCODING, newline='\n') \
                      as checksum_file:
                  line = u"%s  %s\n" % (hash_value, rel_path)
                  _logger.debug(u"[provenance] Added to %s: %s", manifestpath, line)
                  checksum_file.write(line)
docs: Add files to the research object manifest.